section_id unavailable in edit mode?

Author Message

Russell Michell

Tuesday 12 August 2008 5:56:22 pm

Hi there,

I have created separate eZ sections that are mapped to each sub-folder in my content hierarchy. eZ kindly adds section_id_7 (for example) to the outer <div> of each page which allows me to style each section uniquely using a CSS hook (to display a different banner for example).

However, when I login and elect to edit a content object, the banners disappear because there is no longer a class of section_id_7 available in the HTML source. Worse, trying to cludge something in the templates won't work either as the $module_result.section_id variable is empty (it seems only available when browsing not editing for some weird reason).

Is there a way to maintain the section-specific banners even while editing a content-object?

I'm using eZp 4.0 with a modded ezwebin as a new eZ extension.

Many thanks for your time,
Russ

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

André R.

Wednesday 13 August 2008 3:50:11 am

eZ Publish does not return the section id on $module_result.* in content/edit view (and diff, history and versionview).
I created a patch to fix this and reported it here:
http://issues.ez.no/IssueView.php?Id=13494&activeItem=1

Feel free to test and vote.

If you want to work around it you can override the pagelayout and take the section id from the current node / object.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Russell Michell

Wednesday 13 August 2008 9:45:19 pm

Awesome!

Thanks for your very prompt fix Andre, path applied and functioning in 4.0.1rc2.

Many thanks :-)
Russ

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 01:18:43
Script start
Timing: Jan 31 2025 01:18:43
Module start 'layout'
Timing: Jan 31 2025 01:18:43
Module start 'content'
Timing: Jan 31 2025 01:18:43
Module end 'content'
Timing: Jan 31 2025 01:18:43
Script end

Main resources:

Total runtime0.0266 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.2500151.2266
Module start 'layout' 0.00480.0039 739.4766220.7031
Module start 'content' 0.00870.0163 960.17971,001.7891
Module end 'content' 0.02500.0015 1,961.968833.9922
Script end 0.0265  1,995.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002810.5598140.0002
Check MTime0.00113.9651140.0001
Mysql Total
Database connection0.00062.159710.0006
Mysqli_queries0.00207.497030.0007
Looping result0.00000.044810.0000
Template Total0.00114.010.0011
Template load0.00083.092410.0008
Template processing0.00020.910310.0002
Override
Cache load0.00062.084310.0006
General
dbfile0.00165.839680.0002
String conversion0.00000.030540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs