Unable to get tag from ViewData


So I have a block (controller + view) that has a TemplateDescriptor attribute:

[TemplateDescriptor(AvailableWithoutTag = true, Tags = new []{"NoForm"})]
public class SearchBookBlockController : BlockController

For certain pages, the block is added onto pages via a dedicated block type property, not a ContentArea. This is because I want control over exactly where its rendered. To redner the block I'm using the following:

View A:

@{ Html.RenderContentData(Model.CurrentPage.SearchBookBlock.GetContentData(), false, "NoForm"); }

View B:

@{ Html.RenderContentData(Model.CurrentPage.SearchBookBlock.GetContentData(), false); }

I want to know if the action in my controller was triggered with the "NoForm" tag or not, but the following is always null:


Any one any ideas?
Am I better just using Html.Action in this case?

Mar 02, 2016 11:55

Gone with fix here.

Mar 02, 2016 12:15
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.