Suresh R
Suresh R

Reputation: 249

How to integrate bootstrap Icons into Sitecore MVC Link Field

I have below HTML Code:

<a data-toggle="dropdown">Associate Sites<i class="fa fa-angle-down"></i></a>

How can I implement data-toggle attribute, bootstrap icon same as into sitecore MVC field render like below syntax:

   @Html.Sitecore().BeginField("Link Field")
   @Html.Sitecore().Field("Destination URL", item)
   @Html.Sitecore().EndField()

Upvotes: 2

Views: 182

Answers (1)

Chris Auer
Chris Auer

Reputation: 1445

Like this.

@Html.Sitecore().Field("Destination URL", item, new { @data_toggle="dropdown" })

Or

   @Html.Sitecore().BeginField("Link Field", new { @data_toggle="dropdown" })
   @Html.Sitecore().Field("Destination URL", item)
   @Html.Sitecore().EndField()

Upvotes: 0

Related Questions