Forums / Setup & design / set template ?

set template ?

Author Message

Martin Ulrich

Saturday 17 April 2004 2:23:26 pm

Is there a possibility to bring EZ to use another template dynamically?
in older version of EZ it works by URL:
content/view/my_template_name/id (instead of content/view/full/id)
but seems not in 3.4

I have an image album, based on album.tpl. What I want, is to click on a link, an than absolutely the same objects shown in a different view.

I dont want to modify pagelayout (so layout/set/... doesnt work), want to change a "sub"-template.

I want to change album.tpl to my_other_album.tpl, when click on a link.

The objects (images) have the same section, the same class, etc., therefor I can not do a static overide. So how can I tell EZ to use a different album.tpl from that is predefined in override.ini ?

sorry for my stupid artikulation

good night.

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Gunnstein Lye

Monday 19 April 2004 7:28:29 am

If I understand you correctly, you could use something like this in override.ini.append:

[album]
Source=node/view/album.tpl
MatchFile=album.tpl
Subdir=templates

Martin Ulrich

Friday 23 April 2004 5:31:26 am

Thank you!

I think that would work. But the problem is with "match".
The objects (images) are still the same - Same class, same section etc. ... So how can I distinguish them by match[]= ?

Assumed I have a list of Thumbnails. Click on one, show it in a medium size:
[image_medium]
Source=node/view/full.tpl
MatchFile=image_medium.tpl
Subdir=templates
Match[class]=5

Than I want to click once again on Image and should view in large size (with some additional infos):
[image_large]
Source=node/view/image_medium.tpl
MatchFile=image_large.tpl
Subdir=templates
Match[???]=?

how can I bring ez to use another override template? Is it possible to write something in URL or something with "set"

mmh :-) ... ...
;-O

thanks.

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Martin Ulrich

Friday 23 April 2004 6:01:55 am

now I find a solution. I create another override for plain.tpl content/view/plain

for first view I override content/view/full
alternate view I use override for content/view/plain

further question was, is there an .ini where I can define, which viewmodes EZ accepts? content/view/niceview

thanks
ciao

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Gunnstein Lye

Friday 23 April 2004 6:26:21 am

eZ publish accepts any viewmode, as long as there is an entry in override.ini for it.

I don't understand why you want to distinguish between the different views with "Match". Isn't it simpler to use the url? For example:
In image_medium.tpl, the link to the image would be /node/view/image_large/42
In image_large.tpl, the link to the image would be /node/view/image_medium/42

Then eZ publish will use the right template based on the url.

Martin Ulrich

Friday 23 April 2004 11:16:05 am

sorry! it seems that big javascript in template caused that site with other viewmodes is empty. however, at least one page works
http://www.artent.de/media/index.php/content/view/full/385
;-O

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

eZ debug

Timing: Jan 19 2025 11:51:28
Script start
Timing: Jan 19 2025 11:51:28
Module start 'content'
Timing: Jan 19 2025 11:51:29
Module end 'content'
Timing: Jan 19 2025 11:51:29
Script end

Main resources:

Total runtime1.6336 sec
Peak memory usage4,096.0000 KB
Database Queries203

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 589.9453180.8516
Module start 'content' 0.00851.3974 770.7969580.5938
Module end 'content' 1.40590.2277 1,351.3906337.4063
Script end 1.6335  1,688.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00460.2823210.0002
Check MTime0.00160.0969210.0001
Mysql Total
Database connection0.00110.065810.0011
Mysqli_queries1.538494.16982030.0076
Looping result0.00230.14102010.0000
Template Total1.598497.820.7992
Template load0.00240.148920.0012
Template processing1.596097.695820.7980
Template load and register function0.00020.014610.0002
states
state_id_array0.00090.052910.0009
state_identifier_array0.00130.078720.0006
Override
Cache load0.00200.1219580.0000
Sytem overhead
Fetch class attribute can translate value0.00190.117630.0006
Fetch class attribute name0.00130.081170.0002
XML
Image XML parsing0.00130.078930.0004
class_abstraction
Instantiating content class attribute0.00000.000980.0000
General
dbfile0.00520.3175270.0002
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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
14content/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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs