I have a link in my Razor template in one of these forms:
<a href="@item.link" target="_blank">@item.link_title</a>
<a href="@item.tridion_pdf" target="_blank">@item.link_title</a>
So the link & title are coming from content. item.link is just a text field to an external URL & tridion_pdf is a link to a PDF stored in Tridion. I want the user to be able to edit the link & title in Experience Manager (XPM). Is this possible? I've Experience Manager enabled images & text fields individually but not any quite like this where the fields I want to edit are within the same HTML tag structure
Any suggestions?
UPDATE:
I think I need a clarification. This question is specifically about rendering the appropriate markup needed to enable fields for use in XPM. If, for example, I just had a simple text field in a div, I could use the following:
<div>@RenderComponentField("title", 0)</div>
That generates markup like the following, which is fine for that field.
<span><!-- Start Component Presentation: {"ComponentID" : "tcm:99-9999", "ComponentModified" : "2013-05-09T13:06:27", "ComponentTemplateID" : "tcm:99-99999-32", "ComponentTemplateModified" : "2013-05-06T13:48:54", "IsRepositoryPublished" : false } -->
<span><!-- Start Component Field: {"XPath":"tcm:Content/custom:Content/custom:title[1]"} -->
Sample Title
</span>
</span>
But if you look at my sample Razor-encoded links, I have 2 fields I want to edit, not just one. So what do I do here?
<a href="@item.link" target="_blank">@item.link_title</a>