Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

custom sidebar crosslinks

Go to End

3 Posts   1613 Views


Community Member, 8 Posts

26 February 2009 at 8:22pm


I'm working on my first SS project and enjoy the system very much.

In the sidebar of most pages of my website i want to enable the user to add 2-5 crosslink blocks, linking to any other pages in the site. These blocks would consist of the page's title, a truncated version of the content (say, the first line or two) and a "read more..."-link. Exactly as one would do with recent blog posts, but for more "Static" content instead.

Instead of having the user fill out all this information, i want them to be able to choose the page they want to link to and have SS automatically pull the needed data from that page.

How would one go about that, if it's even possible?

I hope i'm being sufficiently clear.




Administrator, 690 Posts

26 February 2009 at 8:34pm

You're going to have to dig into some code, so you might want to start by following the tutorials.

You could make a cross link widget (

* Add a has_one relation to the SiteTree object, called LinkedPage
* In the getCMSFields used a TreeDropdownField to let people edit LinkedPage (
* In the template, you can use $LinkedPage.Title, $LinkedPage.Link, and $LinkedPage.Content to get to the different parts of the content.

Then add a widget feed to your page and your template (

Hope this helps!


Community Member, 8 Posts

26 February 2009 at 10:12pm

Edited: 26/02/2009 10:14pm

Thanks for your prompt help.

I'm not afraid of writing some php, but this looks a lot less straightforward than what I was expecting. Is there perhaps an existing widget with a comparable functionality that i could adapt to my needs?