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.

Template Questions /

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

Might be a pointless question, but...

Go to End

5 Posts   1146 Views

Timothy McClatchey

Community Member, 3 Posts

19 March 2011 at 6:01am

I'm sorry if this is a pointless question, I don't have a lot of time ATM and scoured the documentation a bit, but couldn't find anything regarding what I'm looking for.

Anyway, I'm curious if there is a way to import a page into a template. Not another template page, but one of the pages in the list on the backend.

In case you need to know why, I have a client who want's to change their website to SilverStripe. They have a scrolling news ticker on their website and want to be able to change that content dynamically. I figure if this is possible, just set up a page that's hidden from view and just pull the content into the template code.

Any help that anyone can give me would be much appreciated. Thanks!


Community Member, 79 Posts

19 March 2011 at 9:11am

Could you just untick the "show in menu" box on the Behavior tab? It's not a sophisticated solution, but it would give you a live page that is hidden from the menu.


Timothy McClatchey

Community Member, 3 Posts

19 March 2011 at 3:56pm

I understand how to hide the page in the menus and whatnot. What I am looking to do is import page content dynamically into a template ss file. :)


Forum Moderator, 5521 Posts

19 March 2011 at 6:13pm

<% control Page(url-of-page) %>
.. inside your url-of-page page. You can use $Content etc.
<% end_control %>

Timothy McClatchey

Community Member, 3 Posts

20 March 2011 at 6:11am

Awesome. Works exactly like I wanted it to. Thanks a lot! :)