Forums / Suggestions / Applying features to modules and views

Applying features to modules and views

Author Message

Jan Borsodi

Saturday 26 July 2003 5:27:40 am

Currently things lik section id, pagelayout template etc. are controlled by the view code. This is OK for views like conten/view which returns values taken from the content objects.
However for more 'static' views like search, login etc. the only way to select section ID is to add to the code itself, which in turn makes your code out of sync with eZ publish releases.

A way to solve this is have a .ini file in which you specify a module or a view and which features/characteristics you want to add. Possible things to add/change are:
- Section ID
- Pagelayout template.
- Path
- Design
- Meta data
- Navigation part

Maybe it's a good idea to able to set values before the module/view is run or after (or both), ie. section ID could be set before it is run and pagelayout after.

It could also be a good idea to be able to set values based on view parameters and plain url matches.

Any thoughts on this?

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Daniel Staver

Thursday 21 August 2003 1:54:59 am

I run into this problem almost every time I set up a site. Especially when I create menus and nagivation elements that rely on section or node information.

Would it be possible to allow the user to create instances of the modules anywhere in the node tree through the admin interface?

I'm thinking that in addition to the list of classes when you create new objects you could also have a list of modules. That way you could create separate logins or searches for separate sections on the site and they would each inherit the section and permission information for that area of the site.

From a user point of view it makes sense that anything you can view on the site also has a physical placement within the site structure, and from an administration point of view it would make things much easier since any type of object could be treated the same way.

It should also be possible to create separate override templates for each instance of the module and its related templates.

Daniel Staver
http://daniel.staver.no

Paul Borgermans

Tuesday 02 September 2003 11:23:34 am

This would be very welcome. Just ran into the problem of needing another pagelayout for content/edit.

For now, I added a line to the end of the code of kernel/content/attribute_edit.php

$Result['pagelayout'] = 'pagelayout_edit.tpl';

Where pagelayout_edit.tpl maximises the space available for the edit form elements.

But for the pagelayout.tpl, why not add this to the override.ini function: we only need more match keys for module and function?

Or do I miss an existing match key?

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Jan Borsodi

Wednesday 03 September 2003 12:03:33 am

Using override.ini will work for setting the pagelayout, but it will not work for all the other things I mentioned, such as setting the current section.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Paul Borgermans

Wednesday 03 September 2003 4:58:41 am

Hello Jan

I tried the override.ini, but don't know what Match[??] to use for /content/edit.

I tried Match[view]=edit, but this did not produce the desired result (in 3.1): the default pagelayout.tpl was used

I do support your suggestion, as it introduces more flexibility.

Regards

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

eZ debug

Timing: Jan 18 2025 04:26:18
Script start
Timing: Jan 18 2025 04:26:18
Module start 'content'
Timing: Jan 18 2025 04:26:19
Module end 'content'
Timing: Jan 18 2025 04:26:19
Script end

Main resources:

Total runtime1.1018 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 587.8281180.8281
Module start 'content' 0.00670.8747 768.6563618.0469
Module end 'content' 0.88130.2205 1,386.7031343.1875
Script end 1.1018  1,729.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.3644210.0002
Check MTime0.00140.1283210.0001
Mysql Total
Database connection0.00070.062010.0007
Mysqli_queries1.016792.26932020.0050
Looping result0.00240.21792000.0000
Template Total1.073997.520.5369
Template load0.00190.171420.0009
Template processing1.072097.286920.5360
Template load and register function0.00010.008910.0001
states
state_id_array0.00070.063010.0007
state_identifier_array0.00210.192620.0011
Override
Cache load0.00170.1534430.0000
Sytem overhead
Fetch class attribute can translate value0.00140.123740.0003
Fetch class attribute name0.00150.135380.0002
XML
Image XML parsing0.00170.153940.0004
class_abstraction
Instantiating content class attribute0.00000.0022100.0000
General
dbfile0.00270.2431410.0001
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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 6

Time used to render debug report: 0.0002 secs