Forums / Developer / Hiding nodes

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

eZ debug

Timing: Jan 17 2025 23:38:31
Script start
Timing: Jan 17 2025 23:38:31
Module start 'content'
Timing: Jan 17 2025 23:38:32
Module end 'content'
Timing: Jan 17 2025 23:38:32
Script end

Main resources:

Total runtime1.0650 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 587.5391180.8516
Module start 'content' 0.00900.9583 768.3906627.1094
Module end 'content' 0.96730.0976 1,395.5000341.3984
Script end 1.0649  1,736.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3566210.0002
Check MTime0.00150.1369210.0001
Mysql Total
Database connection0.00070.066510.0007
Mysqli_queries0.987292.69992020.0049
Looping result0.00180.17302000.0000
Template Total1.034197.120.5171
Template load0.00200.185420.0010
Template processing1.032196.918020.5161
Template load and register function0.00010.010010.0001
states
state_id_array0.00110.106510.0011
state_identifier_array0.00080.075820.0004
Override
Cache load0.00180.1665420.0000
Sytem overhead
Fetch class attribute can translate value0.00140.131540.0004
Fetch class attribute name0.00160.146980.0002
XML
Image XML parsing0.00370.351140.0009
class_abstraction
Instantiating content class attribute0.00000.0023100.0000
General
dbfile0.00480.4536390.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs