How to show a template section in only one site access

Author Message

Ville Mattila

Monday 28 January 2008 6:40:54 am

Hello readers,

I should add a small component to a template (full view of certain content class), but it should show up in only one site access, even the template is shared between multiple siteaccesses. How should I do this?

I tried

{if $access_type.name|eq('siteaccessname')}
something to show
{/if}

... but it didn't work at all, whichafter I noticed that $access_type variable is not available in content templates but in pagelayout.tpl.

Any ideas?

Ville

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 20:56:45
Script start
Timing: Jan 18 2025 20:56:45
Module start 'layout'
Timing: Jan 18 2025 20:56:45
Module start 'content'
Timing: Jan 18 2025 20:56:46
Module end 'content'
Timing: Jan 18 2025 20:56:46
Script end

Main resources:

Total runtime1.1744 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 589.1875152.6406
Module start 'layout' 0.00900.0041 741.828139.4766
Module start 'content' 0.01311.1594 781.3047400.0469
Module end 'content' 1.17260.0018 1,181.35168.1250
Script end 1.1744  1,189.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3092160.0002
Check MTime0.00150.1253160.0001
Mysql Total
Database connection0.00150.125810.0015
Mysqli_queries1.121995.5277460.0244
Looping result0.00070.0564440.0000
Template Total1.125095.820.5625
Template load0.00240.206920.0012
Template processing1.122695.588820.5613
Template load and register function0.00030.022510.0003
states
state_id_array0.00210.182510.0021
state_identifier_array0.00220.183220.0011
Override
Cache load0.00180.1515100.0002
Sytem overhead
Fetch class attribute can translate value0.00050.045110.0005
Fetch class attribute name0.00070.056210.0007
XML
Image XML parsing0.00010.012210.0001
class_abstraction
Instantiating content class attribute0.00000.000410.0000
General
dbfile0.00770.6528100.0008
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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs