Help put a link in the content body

Posted by Community Admin on 04-Aug-2018 06:41

Help put a link in the content body

All Replies

Posted by Community Admin on 22-Jan-2012 00:00

Hi everybody.

We're currently using Sitefinity 4.2 for our website and needs urgent help. I know this might sound simple, but for some reason I'm not sure how to do this.

In the content body, I want a link and an image, both clickable which goes to a page within the site. Here's the script. The page where I'm pointing at is pretty obvious (/industrial.....) but the page reference (4a4976b1-0ae2-.....) is the one I can't seem to determine:

<p><a href="/industrial/environment-list/appliances" class="ReadMore" sfref="[pages]4a4976b1-0ae2-4ff3-af12-5129880dd3b2">read more</a></p>

How do I get that from the page?

Thanks in advance.

Posted by Community Admin on 22-Jan-2012 00:00

Hey Ryan,

You can edit a page and drag a 'Content block' widget onto it. Edit it and it'll bring up the screenshot1. Select some text inside the editor window and select the globe icon on top. That'll give you an edit screen where you can select the page from your site, as shown in screenshot2.

Once your done, underneath the editor is a 'html' tab, click that and you'll see the html code with the  sfref="[pages]4e77c475-c6d5-482d-96e4-83b09e312f3c".

---
Obviously you know all that because the sample shows the code already, so I'm not sure what the problem is unless you mean with "in the content body"  hard-coded in a custom Masterpage ?

If so, the reference is a dynamic one, meaning that it will update within Sitefinity. It's the GUID reference for the page inside the db and how you can reference it through code. 

If you like to keep it dynamic, why not place it in the template?
 Hardcoding it in a masterpage is no use, you can just use a regular a href link.

Jochem.

This thread is closed