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!