Hiding nodes

Author Message

Lars Eirik R

Tuesday 23 February 2010 6:54:41 am

Hi.

I need to figure out how to only hide a certain translated article from the contenttree.

As far as I see in the cronjobscript hide.php either a node (meaning all its translations) is visible or hidden.

Is there a way using the api for me to rewrite this and have it check for a given translated version of the content?

Basically we need to be able to say that the english version of the article should be hidden, but the german version should currently be visible.

Any pointers?

Nicolas Pastorino

Tuesday 23 February 2010 8:05:57 am

Hello!

I am afraid what you want to achieve it not a native feature. From inspecting the nodes' table, you can see how the node visibility is stored:

mysql> describe ezcontentobject_tree;
+----------------------------+--------------+------+-----+---------+----------------+
| Field                      | Type         | Null | Key | Default | Extra          |
+----------------------------+--------------+------+-----+---------+----------------+
...
| is_hidden                  | int(11)      | NO   |     | 0       |                |
| is_invisible               | int(11)      | NO   |     | 0       |                |
...
+----------------------------+--------------+------+-----+---------+----------------+

further illustrated by this piece of documentation : http://ez.no/doc/ez_publish/technical_manual/4_x/concepts_and_basics/content_management/node_visibility

In short, the visibility is stored at the node level, and seems to be language-proof, meaning you probably will need to implement some sort of high level, home brew per-language-visibility system to satisfy your needs.

Anyone else has already done this ?

Hope this helped,
Cheers !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Ekkehard Dörre

Tuesday 23 February 2010 8:15:20 am

Hi Lars,

Perhaps you can make a different approach, for example a translatable checkbox in the object, for hide of this version in this language an a little template coding, like the show comments in article.

 {if $node.data_map.enable_comments.data_int}
            <h1>{"Comments"|i18n("design/ezwebin/full/article")}</h1>
                <div class="content-view-children">
                    {foreach fetch_alias( comments, hash( parent_node_id, $node.node_id ) ) as $comment}
                        {node_view_gui view='line' content_node=$comment}
                    {/foreach}
                </div>
        {/if}

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Lars Eirik R

Tuesday 23 February 2010 8:32:48 am

"

Hi Lars,

Perhaps you can make a different approach, for example a translatable checkbox in the object, for hide of this version in this language an a little template coding, like the show comments in article.

 {if $node.data_map.enable_comments.data_int}
            <h1>{"Comments"|i18n("design/ezwebin/full/article")}</h1>
                <div class="content-view-children">
                    {foreach fetch_alias( comments, hash( parent_node_id, $node.node_id ) ) as $comment}
                        {node_view_gui view='line' content_node=$comment}
                    {/foreach}
                </div>
        {/if}

Greetings, ekke

"

Thanks for helping.

I would like to include scheduling, so i probably will have to look at using date comparioson to solve this.

Do you agree that this would affect the menu as well as the full node it self ? How about the cases where someone has embedded this.. i would have to update all of these templates as well?

Thanks.

Ekkehard Dörre

Wednesday 24 February 2010 1:41:33 am

Hi Lars,

can you write us the full plan? What do you want to do totally? Please post a more detailed description,

thanks ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

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 29 2025 23:49:36
Script start
Timing: Jan 29 2025 23:49:36
Module start 'layout'
Timing: Jan 29 2025 23:49:36
Module start 'content'
Timing: Jan 29 2025 23:49:36
Module end 'content'
Timing: Jan 29 2025 23:49:36
Script end

Main resources:

Total runtime0.0134 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0043 588.0078151.1953
Module start 'layout' 0.00430.0025 739.203136.6016
Module start 'content' 0.00680.0054 775.804798.3438
Module end 'content' 0.01230.0012 874.148437.9922
Script end 0.0134  912.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002115.4319140.0001
Check MTime0.00096.8411140.0001
Mysql Total
Database connection0.00075.330710.0007
Mysqli_queries0.002216.685330.0007
Looping result0.00000.097510.0000
Template Total0.00096.810.0009
Template load0.00075.153410.0007
Template processing0.00021.643410.0002
Override
Cache load0.00053.442710.0005
General
dbfile0.00139.548180.0002
String conversion0.00000.028440.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