Forums / Setup & design / Howto: Same category structure, different regional areas

Howto: Same category structure, different regional areas

Author Message

D K

Saturday 18 July 2009 9:39:49 am

Hello everyone,

I'm new to EZP, preparing a portal with information concerning events in different cities.
I can use some help strategically. So thanks in advance.

Picture an organic event like a modern circus consinsting of a) live music, b) acting and c) acrobatics. Just a stupid example.

An article about this event is to be written. And it should be written only once, yet published for all cities concerned.

What I want to do in the backend is: Pick the cities, for which the article is to be published. Then pick those three categories, and do that only once, but have them set for all the cities in their respective tree!

Look at http://www.timeout.com/ [which is not my site, just similar in structure], and imagine my circus touring through 10 countries and 20 cities each.

You really would not want do pick all three categories times 20 times 10, would you? Me neither.

Are there respective solutions, hints, suggestions?

kracker (the)

Sunday 19 July 2009 6:35:39 am

Hello,

I think I understand your concern.

Would you accept a php shell script
which would update a content object
subtree (parameter, int, nodeid) and
assign the desired attribute values (parameters).

./extension/assignattribvals/bin/php/assignattribval.php -v nodeid=2 values=(array)

In general this seems a little confusing
of an idea but one that I think is still
simple enough to implement using
the eZ PHP API.

Cheers,
<i>//kracker</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Heath

Sunday 19 July 2009 6:46:09 am

While a script may be most flexible it is not always the most convenient for content editors.

I recommend a workflow event which performs the update (assigned to content update trigger).

In this way to complement a separate optional php cli script and or cronjob.

I also recommend defining your attribute values as custom settings. Ie: One set of attribute value settings per 'unique' set.

You may wish to even look into storing the value sets (to be applied) as content objects (Idea)

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

D K

Tuesday 21 July 2009 6:01:59 am

Thanks so far. I've forwarded your hints to my technical freelancer. From the point of view of an editor I'd like to ask, if there could be a solution, that might be more work in coding, but less work in editing afterwards.

Would it be possible to have two sets of main categories apart, and then let a query compose the right subfrontpages of the two instead of actually storing the content as duplicates in all those categories?

What I mean, in all my naivity as an editor, is:

On one hand I'd set my root categories, which also make the top level navigation on the homepage, i.e. concerts, parties, theater, art exhibitions, sport. These actually store all the content.

On the other hand I'd have a second set of categories apart from the first: geographical regions, which make an upstream alternate navigation, maybe triggering session cookies when clicked on.

If a region is picked, the whole top level navigation from then on refers to www.page.com/region/category instead of the original www.page.com/category.

Within www.page.com/region you can find only category frontpages, no folders. No content stored, but teasers.

Those frontpages are composed of content teasers matching both criteria: category AND region.

Clicking a teaser leads the user to the original storage place of the content in it's root directory.

Editing an article I'd choose my categories and regions once. And that would be it.

Could that be done, or is it nonprogrammer-nonsense?

Cheers
DK

eZ debug

Timing: Jan 18 2025 11:27:53
Script start
Timing: Jan 18 2025 11:27:53
Module start 'content'
Timing: Jan 18 2025 11:27:54
Module end 'content'
Timing: Jan 18 2025 11:27:54
Script end

Main resources:

Total runtime1.0243 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 587.9531180.8125
Module start 'content' 0.00770.8992 768.7656607.8125
Module end 'content' 0.90690.1173 1,376.5781337.3359
Script end 1.0242  1,713.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.4282210.0002
Check MTime0.00180.1800210.0001
Mysql Total
Database connection0.00100.100010.0010
Mysqli_queries0.947892.52921990.0048
Looping result0.00190.18891970.0000
Template Total0.989796.620.4949
Template load0.00220.218220.0011
Template processing0.987596.405620.4937
Template load and register function0.00010.010510.0001
states
state_id_array0.00210.209810.0021
state_identifier_array0.00080.074220.0004
Override
Cache load0.00190.1898500.0000
Sytem overhead
Fetch class attribute can translate value0.00120.112840.0003
Fetch class attribute name0.00080.080960.0001
XML
Image XML parsing0.00200.190640.0005
class_abstraction
Instantiating content class attribute0.00000.001460.0000
General
dbfile0.00230.2236360.0001
String conversion0.00000.000730.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
4content/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
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs