BeginRenderLink Sitecore Glass Mapper

I have two fields in Sitecore:

  • More details.
  • Details Title.

I use sitecore MVC with a glass mapper and I need to make both fields editable on the eidtor page, so I use this code:

<div class="callout-footer"> <p> @using (BeginRenderLink(calloutItem, m => m.ReadMoreLink, new NameValueCollection { { "class", "group-action" } }, isEditable: true)) { <span class="text">@Editable(calloutItem, m => m.ReadMoreTitle) </span> } </p> </div> 

Now I can edit the link, but the title is still not being edited. How to make them editable from the page editor?

+5
source share
2 answers

Ayman

There is no reason why this should not work, and I simply duplicated it locally, without problems, successfully editing the link (via the Sitecore Experience buttons in the page editor) and Title (through standard text editing in the page editor). How exactly is the name not being edited? You just can't get into the editing frame in edit mode?

The only thing I have is that perhaps your Text class in the gap interferes with the layout of the Sitecore editor. Could you try deleting and see if you can edit ReadMoreTitle?

+1
source

Yes, I couldn’t get into the iframe, I deleted the parent css div when the page mode is “page editing”. This seems to be because there is a conflict between the css editor and my css project. now everything is working fine.

Thanks.

0
source

Source: https://habr.com/ru/post/1209216/


All Articles