Forums / Setup & design / Please help me

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.

eZ debug

Timing: Jan 18 2025 15:59:55
Script start
Timing: Jan 18 2025 15:59:55
Module start 'content'
Timing: Jan 18 2025 15:59:56
Module end 'content'
Timing: Jan 18 2025 15:59:56
Script end

Main resources:

Total runtime1.1680 sec
Peak memory usage4,096.0000 KB
Database Queries211

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0086 587.6016180.8516
Module start 'content' 0.00860.9765 768.4531628.3828
Module end 'content' 0.98510.1827 1,396.8359341.0938
Script end 1.1679  1,737.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3493210.0002
Check MTime0.00160.1365210.0001
Mysql Total
Database connection0.00180.155810.0018
Mysqli_queries1.068891.50822110.0051
Looping result0.00250.21252090.0000
Template Total1.136697.320.5683
Template load0.00190.162320.0009
Template processing1.134697.140420.5673
Template load and register function0.00020.013710.0002
states
state_id_array0.00110.093310.0011
state_identifier_array0.00140.121120.0007
Override
Cache load0.00170.1467560.0000
Sytem overhead
Fetch class attribute can translate value0.00130.113040.0003
Fetch class attribute name0.00190.159090.0002
XML
Image XML parsing0.00110.093240.0003
class_abstraction
Instantiating content class attribute0.00000.0023100.0000
General
dbfile0.01401.1994270.0005
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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