Please help me

Author Message

Kjerand Pedersen

Thursday 24 July 2003 9:28:14 am

I previously posted this http://www.ez.no/developer/ez_publish_3/forum/setup_design/different_templates_for_the_same_class_and_in_same_section

and I'm sorry for repeating myself, but this is the only thing I need to resolve before going live with my site:

http://www.stavangerkampsport.com/index.php
(Norwegian)

I have a class named 'profil' where I store information about members in our club. This is used for the 'Instruktører' and 'Styret' pages.

I need to use two different templates for showing content in the 'profil' class, as I wish to display different information in the two pages.

I tried, as described in my previous post, to add this to the override.ini:

[line_profil2]
Source=node/view/line.tpl
MatchFile=line_profil2.tpl
Subdir=templates
Match[parent_node]=65
Match[class]=16

[line_profil]
Source=node/view/line.tpl
MatchFile=line_profil.tpl
Subdir=templates
Match[class]=16

Where '65' is the node_id of the 'Styret'-folder.

Please, please help me out...

Alex Jones

Thursday 24 July 2003 9:34:45 am

This is a longshot, but you may want to try putting Match[class] above Match[parent_node].

Also, have you made sure to clear the ini and template caches?

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Kjerand Pedersen

Thursday 24 July 2003 9:37:24 am

I've already tried this, but it didn't work.

Thanks for your reply though :-)

Alex Jones

Thursday 24 July 2003 9:39:19 am

Okay, another idea... try changing:
Source=node/view/line.tpl
to :
Source=line.tpl

and clear the caches.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Kjerand Pedersen

Thursday 24 July 2003 9:43:45 am

No, that didn't work either :-(

Jerry Jalava

Thursday 24 July 2003 10:08:01 am

Hi,

What if you ad Match[section]=10 to the [line_profil2] or [line_profil] instead of the "parent_node"? Where 10 is the number of you profil2 (if you putted it in [line_profil2]) section...

They both have to have different sections for this to work... ;)

I use this section trick to make different full and line files for same class...

Hope this helps,
Jerry

Kjerand Pedersen

Thursday 24 July 2003 11:17:35 am

I tried this, but there's another problem...

I save the content of the class in the 'Instruktør' folder and add location to the 'Styret' folder. So it still uses the same template. However, if I create a new object with the Profil-class and store it in the 'Styret' folder, it uses the correct template.

You see, an instructer can also be a member of the board, so I need to keep them in one place, so I don't have to update the same information in several locations.

Oh, please, let there be a solution to this :-| :-)

Thanks for all help so far

Kjerand Pedersen

Thursday 24 July 2003 12:40:19 pm

I gave up on using different templates and instead just put the code I had in my line_styret template into the loop-section in my node_styret template.

It works, although it's not the ideal way to do it.

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:31:22
Script start
Timing: Jan 18 2025 18:31:22
Module start 'layout'
Timing: Jan 18 2025 18:31:22
Module start 'content'
Timing: Jan 18 2025 18:31:23
Module end 'content'
Timing: Jan 18 2025 18:31:23
Script end

Main resources:

Total runtime1.0379 sec
Peak memory usage4,096.0000 KB
Database Queries74

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 587.7891152.6094
Module start 'layout' 0.00750.0034 740.398439.4297
Module start 'content' 0.01081.0255 779.8281623.3203
Module end 'content' 1.03630.0016 1,403.148416.1953
Script end 1.0379  1,419.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3353160.0002
Check MTime0.00140.1350160.0001
Mysql Total
Database connection0.00130.121110.0013
Mysqli_queries0.966293.0849740.0131
Looping result0.00080.0814720.0000
Template Total0.995395.920.4977
Template load0.00200.192320.0010
Template processing0.993395.698420.4966
Template load and register function0.00010.012810.0001
states
state_id_array0.00100.094710.0010
state_identifier_array0.00140.139320.0007
Override
Cache load0.00180.1705560.0000
Sytem overhead
Fetch class attribute can translate value0.00050.050330.0002
Fetch class attribute name0.00150.148590.0002
XML
Image XML parsing0.00070.067930.0002
class_abstraction
Instantiating content class attribute0.00000.0020100.0000
General
dbfile0.00090.0873160.0001
String conversion0.00000.000840.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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs