Forums / General / pagelayout, show css only with selected attribute Class
Martin Sanders
Friday 22 June 2007 3:32:20 pm
Hi, I'm looking to add a custom css style to an element within the pagelayout.tpl template which is only visibility displayed with a specific ez attribute class called 'frontpage'. How do I also scrip the 'if' statement so that it's also called within the Versionview preview.
I'm using 3.9 with the front end editing option enabled. Any help welcomed, regards,
M
Saturday 23 June 2007 4:26:13 am
any help welcome, many thanks
Łukasz Serwatka
Monday 25 June 2007 12:14:35 am
Hi,
Custom CSS files you can add in overridden design.ini.append.php (per siteaccess or globally). Those files are loaded after default, so you can override existing styles.
ezwebin pre-view template calls full view template with parameter versionview_mode=true()
In your full view template you can check variable:
{if $versionview_mode} preview {else} not preview {/if}
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Thursday 28 June 2007 1:17:23 pm
hi Lukasz, thanks for the feedback but I can't seem to get the code to work, it doesn't seen to be able to tell the difference from a preview or edit page.
m
Friday 29 June 2007 12:09:52 am
Could you better describe what you want to do? In which template did you put that check? Do you use website interface?
Script start
Module start 'content'
Module end 'content'
Script end
Time used to render debug report: 0.0002 secs