Forums / Setup & design / section_id unavailable in edit mode?

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.