Layouts help needed

Hi,

I am trying to create a new theme for Typo. For this I want the index
page
to have a different layout than the rest of the pages. Can someone
please
help me in this direction, as to how can I set up a new layout for the
index
page apart from the default layout.

Regards

On 12/30/07, Sanjay B. [email protected] wrote:

Hi,

I am trying to create a new theme for Typo. For this I want the index page
to have a different layout than the rest of the pages. Can someone please
help me in this direction, as to how can I set up a new layout for the index
page apart from the default layout.

You can’t. Well, not directly. You’d have to have a test in the
default layout and have it select the actual layout partial to use.

Hi Piers,

Can you please explain as to what you just mentioned. I did not
understand
you perfectly.

Hi ~
You would implement this by checking if the controller/action is the
index
page on the layout for your theme. If it is you would render a
different
partial. I guess you could do it with a before_filter too that
dynamically
assigned the layout, but this could get messy since you would be messing
with the Typo source.

~ Ben

Hello,

Even tough I hate using conditionnal statement in themes, the solution
I use is

if controller.controller_name == ‘foobar’ and controller.action_name
== ‘foobar’
do something
else
do soemthing else
end

Hope this helps
Fred

Le 30 déc. 07 à 18:18, Ben R. a écrit :

Hey,

Even I was thinking on the same lines, but somehow it’s not giving me
the
satisfaction (the one that you get when you know the job is perfectly
done
:slight_smile: ). I guess that I will have to try the else-if loop only.

Thanks and regards

On Dec 30, 2007 11:39 PM, Frederic de Villamil
[email protected]