Forums / Developer / Hide/Show nodes with Website Toolbar

Hide/Show nodes with Website Toolbar

Author Message

Nabil Imran

Tuesday 03 August 2010 2:14:58 am

Hello,

is there a way to enable the "hide/show node" functionality in the website toolbar (ezwt) ?

This would also include to make hidden objects visible to logged in users, but beeing marked as hidden (e.g. grey), the same it is in the site_admin siteaccess.

If this is not possible by configuration, how could I achieve this programmatically?

André R.

Tuesday 03 August 2010 2:28:31 am

It's not possible without some changes. Setting for showing / hiding hidden is global, and not a policy, thus if we add a 'hide', you won't get access to show it again unless you log in to admin interface (as you should for getting access to features like this, specifically meant for administration of site and content).

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

Tero Auralinna

Tuesday 03 August 2010 2:31:33 am

I would use object states for hiding objects. Though you need to edit templates if you want to mark object with hidden state as grey for editors. Then you could set policies so that anonymous users can't read hidden objects but editor group are still able to see them.

NXC Finland - Open Source solutions, Internet marketing and web analytics
http://www.nxc.fi
http://www.auralinna.fi
http://twitter.com/teroauralinna

Nabil Imran

Tuesday 03 August 2010 8:42:46 am

Thank you for the replies. The object states are a great feature! It already works quite well.

One more question:

Is there any kind of hook mechanism that allows to call some extra php code, whenever the state of an object is changed?

I was thinking about something similar to the eZContentObjectEditHandler that is called, when objects are being edited.

I need this to syncronize some data in custom tables when objects are getting hidden

Tero Auralinna

Tuesday 03 August 2010 10:15:28 am

You can create workflow for state update. There is AvailableOperationList[]=content_updateobjectstate setting in workflow.ini which enables trigger for state change.

NXC Finland - Open Source solutions, Internet marketing and web analytics
http://www.nxc.fi
http://www.auralinna.fi
http://twitter.com/teroauralinna