Share » Forums » Developer » Using 1 template for more than one...

Using 1 template for more than one section/node etc?

Using 1 template for more than one section/node etc?

Wednesday 11 May 2005 12:52:30 am - 2 replies

Modified on Wednesday 11 May 2005 12:53:15 am by Clemens T

Author Message

Hans Melis

Wednesday 11 May 2005 6:22:48 am

You can use the same override template for multiple "targets", but you can't do it with just one block in the override.ini file because you can't use an OR condition between match keys.

So you have to create one block in override.ini per match.

Example:

[news_folder]
Source=node/view/full.tpl
MatchFile=full/news_folder.tpl
Subdir=templates
Match[class_identifier]=folder
Match[node]=63

[sports_folder]
Source=node/view/full.tpl
MatchFile=full/news_folder.tpl
Subdir=templates
Match[class_identifier]=folder
Match[node]=64

Both point to the same template, but with different match keys. Also make sure the name of the block (eg [news_folder]) is different for each block.

hth

Hans
http://blog.hansmelis.be

Clemens T

Wednesday 11 May 2005 6:43:47 am

Thanks, I think this is exactly what I was looking for!! Kudos for you!
Greets,
Clemens

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu