Forums / General / "Add locations" USELESS for parent objects

"Add locations" USELESS for parent objects

Author Message

Stephen Paschall

Wednesday 22 October 2003 11:49:23 am

Adding locations for objects that have children (e.g., folders) simply doesn't work properly. The subtree is lost at the new location. Really, what's the point of allowing it if the subtree doesn't follow the parent? You've got to go through it node by node, manually, to recreate the subtree if you want to post such an object in multiple locations.

I've noticed several posts to this effect, going back for some time now. It's hard to believe this hasn't been addressed yet. Granted, I know this is an open source product and we can't exactly demand action on this from eZ, but you have commercial clients using this tool, too, and I think this is a major flaw that needs attention, fast.

I'm trying to familiarize myself with system layout so I can figure out how to fix it myself, but this is a complex project and it's going to take me some time to get to that point. Will this be resolved in eZP 3.3?

Alex Jones

Wednesday 22 October 2003 11:59:30 am

While I would like this functionality, I think it is important to keep in mind that automatically adding children is not always desired.

The system should provide an option as to whether the children of an item should also be added to the location.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Stephen Paschall

Thursday 23 October 2003 6:45:24 am

Granted, for many content classes, that's true. For certain classes, however (most especially the built-in "folder" class), you almost always want to carry over the subtree. It would also be nice if you had the option of creating a true "copy" at the new location or just a "link".

I'd simply like to be able to maintain *any* content element at multiple locations without having to update multiple copies. It's neither intuitive nor particularly useful the way it works now.

Jan Borsodi

Thursday 23 October 2003 10:55:54 pm

There's no need to link in all subchildren to both locations. If you want a folder to show the same children in all locations you only need to change the template listing.
Instead of fetching children from the current node you should fetch them from the main node of the object, if you then make sure that new subchildren are always placed at the main node you will not have any problems.

It is not a flaw but a design decision to not make things more complex than they need to be.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Jonny Bergkvist

Monday 27 October 2003 1:39:56 am

Jan,

I can't see that you could get full functionality just with templates for carrying the subtree with you at the added location.

It will work fine at the first level when you open the object from the added location, the template could view a tree view or list view of the main locations children. But when you want to go deeper into the sub-tree you will then jump to the sub-tree at the original location.

If you ie. want a folder and its subtree to be viewed also at another section that has another design, then you should be able to let this object carry the whole subtree/all children into that added location.

Please consider making this feature in a future eZ publish-version :-)

Jonny

Jaroslav Satkevic

Tuesday 11 November 2003 12:58:33 pm

Thanx to Jan Borsodi.

I just replace "hash(parent_node_id,$:item.node_id..." with "hash(parent_node_id,$:item.main_node_id" in folder.tpl file :)

If you need se in add lovation's children in site's submenu, just replace one line in menu script ( pagelayout.tpl ... ).

eZ debug

Timing: Jan 18 2025 11:40:07
Script start
Timing: Jan 18 2025 11:40:07
Module start 'content'
Timing: Jan 18 2025 11:40:09
Module end 'content'
Timing: Jan 18 2025 11:40:09
Script end

Main resources:

Total runtime1.4536 sec
Peak memory usage4,096.0000 KB
Database Queries209

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 588.9375181.6563
Module start 'content' 0.00951.2855 770.5938684.4688
Module end 'content' 1.29500.1585 1,455.0625341.0781
Script end 1.4535  1,796.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2701210.0002
Check MTime0.00150.1012210.0001
Mysql Total
Database connection0.00080.054210.0008
Mysqli_queries1.375894.65252090.0066
Looping result0.00230.15742070.0000
Template Total1.421297.820.7106
Template load0.00240.162920.0012
Template processing1.418897.609720.7094
Template load and register function0.00010.009810.0001
states
state_id_array0.00120.080410.0012
state_identifier_array0.00080.054420.0004
Override
Cache load0.00190.1297310.0001
Sytem overhead
Fetch class attribute can translate value0.00100.068660.0002
Fetch class attribute name0.00140.096790.0002
XML
Image XML parsing0.00200.134660.0003
class_abstraction
Instantiating content class attribute0.00000.001190.0000
General
dbfile0.00240.1672400.0001
String conversion0.00000.000530.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0003 secs