pagelayout, show css only with selected attribute Class

Author Message

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

Martin Sanders

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

Martin Sanders

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

Łukasz Serwatka

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?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:14:48
Script start
Timing: Jan 18 2025 18:14:49
Module start 'layout'
Timing: Jan 18 2025 18:14:49
Module start 'content'
Timing: Jan 18 2025 18:14:49
Module end 'content'
Timing: Jan 18 2025 18:14:49
Script end

Main resources:

Total runtime0.7433 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 588.0547152.6406
Module start 'layout' 0.00640.0034 740.695339.4766
Module start 'content' 0.00980.7315 780.1719555.9453
Module end 'content' 0.74130.0019 1,336.117212.1250
Script end 0.7433  1,348.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4715160.0002
Check MTime0.00140.1827160.0001
Mysql Total
Database connection0.00080.112010.0008
Mysqli_queries0.689492.7449630.0109
Looping result0.00070.0876610.0000
Template Total0.711495.720.3557
Template load0.00170.233020.0009
Template processing0.709695.465720.3548
Template load and register function0.00020.021410.0002
states
state_id_array0.00090.117710.0009
state_identifier_array0.00080.104420.0004
Override
Cache load0.00150.1953210.0001
Sytem overhead
Fetch class attribute can translate value0.00100.138320.0005
Fetch class attribute name0.00140.181960.0002
XML
Image XML parsing0.00080.104420.0004
class_abstraction
Instantiating content class attribute0.00000.002070.0000
General
dbfile0.00180.2429180.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs