Forums / Setup & design / Creating Groups Areas / Multiple Section Template Overrides?

Creating Groups Areas / Multiple Section Template Overrides?

Author Message

Paul Wilson

Thursday 01 March 2007 4:38:24 am

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.

Claudia Kosny

Thursday 01 March 2007 5:02:07 am

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

Paul Wilson

Thursday 01 March 2007 2: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

eZ debug

Timing: Jan 18 2025 19:09:01
Script start
Timing: Jan 18 2025 19:09:01
Module start 'content'
Timing: Jan 18 2025 19:09:02
Module end 'content'
Timing: Jan 18 2025 19:09:03
Script end

Main resources:

Total runtime1.2986 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0111 587.9688180.7969
Module start 'content' 0.01111.0142 768.7656522.8828
Module end 'content' 1.02520.2733 1,291.6484336.7109
Script end 1.2986  1,628.3594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00530.4101210.0003
Check MTime0.00190.1496210.0001
Mysql Total
Database connection0.00190.147010.0019
Mysqli_queries1.190591.67551940.0061
Looping result0.00240.18591920.0000
Template Total1.233495.020.6167
Template load0.00360.275920.0018
Template processing1.229894.698120.6149
Template load and register function0.00010.007910.0001
states
state_id_array0.00340.263810.0034
state_identifier_array0.00480.367820.0024
Override
Cache load0.00270.2072360.0001
Sytem overhead
Fetch class attribute can translate value0.00150.112130.0005
Fetch class attribute name0.00120.092240.0003
XML
Image XML parsing0.00090.066030.0003
class_abstraction
Instantiating content class attribute0.00000.001150.0000
General
dbfile0.00580.4501270.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs