3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 859 Views |
-
Might be a pointless question, but...

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!
-
Re: Might be a pointless question, but...

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.
HB
-
Re: Might be a pointless question, but...

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.
-
Re: Might be a pointless question, but...

19 March 2011 at 6:13pm
<% control Page(url-of-page) %>
.. inside your url-of-page page. You can use $Content etc.
<% end_control %>http://doc.silverstripe.org/sapphire/en/reference/built-in-page-controls
-
Re: Might be a pointless question, but...

20 March 2011 at 6:11am
Awesome. Works exactly like I wanted it to. Thanks a lot!
| 859 Views | ||
|
Page:
1
|
Go to Top |


