I use Orchard CMS 1.10.1
. I have created an alternate for a menu, I know how to add a class attribute
to a tag
var tag = Tag(Model, "ul");
tag.AddCssClass("class-custom");
I need to add an id attrubite
to this ul
tag. How can I do this?
You can use one of the following methods to add custom attributes:
Model.Attributes.Add("id", "blah");
var tag = Tag(Model, "ul");
var tag = Tag(Model, "ul");
tag.MergeAttribute("id", "blah");
Model.Id = "blah";
var tag = Tag(Model, "ul");