I usually have a credit in the footer of a clients site.
I would like this only to appear on the home page.
Is there an easy way to achieve this without using a different layout?
I usually have a credit in the footer of a clients site.
I would like this only to appear on the home page.
Is there an easy way to achieve this without using a different layout?
I'd say a duplicate layout IS the easy way.
maybe php in the fe_page template?
if the alias is such-and-such, echo the module/content element via insert tag
The insert tags extension allows you define custom text and put it only on selected page(s)
if you can't or simply don't want to use 2 different layouts I think this is the only solution
Consulenza Contao CMS https://www.intco.it
ga.n you are a STAR!! That is a perfect solution!
I have not used inserttags in that way before and did not realise that you could select pages. I have tested it and it works perfectly.
Far better than creating another layout!!
I have added a feature request on the development site which may be what you need.
http://dev.contao.org/issues/2594
I don't like creating lots of page layouts for one site and if you made your footer a module this may solve the issue.
Hi Ben,
Eventually I decided I wanted a If hope page display this, else display something else.
So I ended up including a php file in the footer.
Your feature request would enable much cleaner solutions.
Hi Doublespark,
i guess using a body class will also work without using another menu.
Set the body class for e.g to the home page by using:
and for all other pages set this to:Code:body.home .footer-credit{....}
Code:body.home .footer-credit { display:none; }
---------------------------------------------------
kind regards planepix
Official Contao team member - Official Contao partner
workshop contao conference site 2011
workshop contao conference site 2012
Bookmarks