0

I have the a link item and a separate title field:

using (BeginRenderLink(linkWithText, x => x.LinkTitle, new { @class = "button primary"}, isEditable: Sitecore.Context.PageMode.IsPageEditor))
{
    @Editable(linkWithText, x => x.Title)
}

This works fine on the website and in preview mode. But when I switch to Page Editing mode. The "class button primary" isn't added to the link.

Looking at the source code for BeginRenderLink it doesn't add the attributes when in page editing mode.

Does anyone know a good work around?

Thanks Hans

Anonymous
  • 10,002
  • 3
  • 23
  • 39
Hans ter Wal
  • 156
  • 8

0 Answers0