This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » Creating Groups Areas / Multiple...
expandshrink

Creating Groups Areas / Multiple Section Template Overrides?

Creating Groups Areas / Multiple Section Template Overrides?

Thursday 01 March 2007 1:38:24 pm - 2 replies

I'm trying to set up group areas using EZP 3.9.0.

I had:
- groups set up as folders (all in a user groups section)
- user groups having a roles/permissions over a sub-tree of the user groups section.

But this will not work the way I want it because there is no template override method for subtrees. (Yes, there is match[url_alias], but this seems to depend on having a static url - so groups couldn't change names - not without some nifty programming anyway).

So having undone all of that work and redone it so that each group has its own section, I've run into another problem. Perhaps it's obvious and I'm missing something.

I've tried to create an override for pagelayout.tpl.

(In 3.9.0 I've added an override.ini.append.php to /extensions/ezwebin/settings)

Anyway, the override works only for one section/group not the three I specify.

My override entry is:

[pagelayout_groups]
Source=pagelayout.tpl
MatchFile=pagelayout_groups.tpl
Subdir=templates
Match[section]=36
Match[section]=37
Match[section]=38

... the Match[section]=38 is recognised and loaded, the others are not. I even tried separating this out into three entries, each with a single Match[section]. By changing the order I discovered that it is always the last entry that is recognised - the first two are ignored.

I can create three different pagelayout files - one for each section. But then this just adds yet another level of hassle and extra work if I have a large number of groups set up.

I've spent around 2 days now dealing with this aspect of a groups system - for what seems like no result.

Is there something wrong with my override above? or something I'm missing?

Any thoughts gratefully accepted.

Modified on Thursday 01 March 2007 1:40:44 pm by Paul Wilson

Thursday 01 March 2007 2:02:07 pm

Hi Paul

You say:

... I even tried separating this out into three entries, each with a single Match[section]. By changing the order I discovered that it is always the last entry that is recognised - the first two are ignored.

This approach should work. From your error description I guess that you have really copied the section three times and just changed the section ids. But you also need to change the name of this override match (the [pagelayout_groups]). Otherwise the last entry will overwrite any preceding entries with the same name.

Claudia

Thursday 01 March 2007 11:55:15 pm

Aha. Thanks Claudia, that's it.

Too many long days and late nights/early mornings working with EZ Publish has taken its toll on me.

For anyone else, the method that works is as follows:

Different pagelayouts for each section:

[pagelayout_group_36]
Source=pagelayout.tpl
MatchFile=pagelayout_group_36.tpl
Subdir=templates
Match[section]=36

[pagelayout_group_37]
Source=pagelayout.tpl
MatchFile=pagelayout_group_37.tpl
Subdir=templates
Match[section]=37

OR
The same (new) pagelayout file for each section:

[pagelayout_group_36]
Source=pagelayout.tpl
MatchFile=pagelayout_groups.tpl
Subdir=templates
Match[section]=36

[pagelayout_group_37]
Source=pagelayout.tpl
MatchFile=pagelayout_groups.tpl
Subdir=templates
Match[section]=37
expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from