I am not able to update the url of a external url field. Can anyone suggest what I am missing here?
Here is the code I am using:
@Html.SiteEditField(Model.Component, Model.Component.Fields["Link"].EmbeddedValues[0]["ExternalLink"])
<a href="@Model.Component.Fields["Link"].EmbeddedValues[0]["ExternalLink"].Value" class="learn-more">@Html.SiteEditField(Model.Component, Model.Component.Fields["Link"].EmbeddedValues[0]["LinkText"])@Model.Component.Fields["Link"].EmbeddedValues[0]["LinkText"].Value</a>
Where "ExternalLink" is of type external url inside linked component "Link". Yes, I am able to update text inside url which is "LinkText" inside linked component "Link".
Below is the markup generated on the page:
<!-- Start Component Field: {"XPath":"tcm:Content/custom:HomePageWidget/custom:Link[1]/custom:ExternalLink[1]"} -->
<a href="/Services/" class="learn-more"><!-- Start Component Field: {"XPath":"tcm:Content/custom:HomePageWidget/custom:Link[1]/custom:LinkText[1]"} -->Find Out How</a>
Thanks. Mukesh