Forums / Developer / Need objects to be published hidden from module

Need objects to be published hidden from module

Author Message

Felix Laate

Thursday 16 March 2006 4:31:42 am

Hi all,

here's another question for you all.. just so that you wont fall asleep..

I have a module that recieves SMS-messages and handles them depending on the code words given at the start of the message.

If they begin with a certain word, the text of the message should be published as a certain object in a designated folder.

BUT, I need the objects to be published hidden (i.e. they need to be approved before "final publishment").

I thaught I could do it by setting the is_hidden attribute by the node-assignment. But it doesn't work.

Here's the code:

$nodeAssignment =& eZNodeAssignment::create( array(
'contentobject_id' => $contentObject->attribute( 'id' ),
'contentobject_version' => $contentObject->attribute( 'current_version' ), 
'parent_node' => $parentNodeID,
'sort_field' => 2,
'sort_order' => 0,
'is_main' => 1,
'is_hidden' => 1
));

Any help is helpful!

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Nabil Alimi

Friday 17 March 2006 5:08:46 am

If your content needs to be approved before being published, you can achieve this by using the workflow system. http://ez.no/doc/ez_publish/technical_manual/3_6/concepts_and_basics/workflows

But you can also add a "validated" field (checkbox) to your content class. Then by using attribute filtering, you may retrieve only validated objects.

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr