Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Template Questions
SilverStripe Forums » Template Questions » renderWith and layout
|
Page:
1
|
Go to End | |
| Author | Topic: renderWith and layout | 836 Views |
-
renderWith and layout

28 January 2009 at 12:19am Last edited: 28 January 2009 12:20am
Hi,
I have a file like this :
templates/Page.ss :
<p>$Layout</p>
and another :
templates/layout/Pages.ss
toto
In a controller I have an action that return :
$this->renderWith('Page');
in the response I have 'toto' instead of :
<p>toto</p>
why?
-
Re: renderWith and layout

28 January 2009 at 8:48am
That's odd. Try adding "?showtemplate=1" to the end of the URL - that will tell you what templates it's hitting.
(btw, does your layout dir have a capital L? Don't know if it matters, but mine always have L instead if l)
-
Re: renderWith and layout

28 January 2009 at 9:13am Last edited: 28 January 2009 9:14am
Sure you have flushed? (?flush=1)
On the other hand try
$this->renderWith(array('Page', 'Page'));
| 836 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: There is nobody online.
Welcome to our latest member: GreenWork



