Forums / Developer / Fetch related to URL

Fetch related to URL

Author Message

Jorge estévez

Monday 24 September 2007 7:53:43 am

I have this multisite to develop...

One site / 4 languages / 4 designs / one database / category and
products to be seen related to the URL used to access the site

The site will be used from 4 different countries with it's own design,
depending on the URL's access to the site I should change the design,
this is solved via it's own siteaccess, but also I must show or not
certain categories of products.

Now, this sounds quite simple but the only idea I have is to add Check
Marks attributes to the Category Class and associate them with the URL's
they can be accessed from.

This will allow me to make fetches of category trees, but I must first
check from what URL I have been visited from and get, while comparing
(via fetch), the Category Objects and his check marks to allow or not to
be added to the array by the fetch function when getting the objects.

This is very inefficient and surely will consume extra time as being the
fetch function a very used code all arround the site.

I cannot use roles because things could be very complicated due to the
constant changes of the categories status as from who they are going to
be seen (from witch URL), so I assume check marks that will relate the
category with the URL could solve this issue.

So I need some Ideas of a simple way of handling this... "URL versus Fetch"

I was wondering if I could set up (only once for each session) several
global variables (that will be "active" for each user session) and
knowing the status of the variables I could implement a better fetch or
else. But I am not sure if this could be an efficient piece of algorithm.

Anyway if someone has a similar problem or a better idea it will be nice
to hear from you.

Thanks...

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

André R.

Tuesday 25 September 2007 12:45:34 am

Hi!
Could you break your quistion down to a few lines?
I guess you have 4x4 siteacesses or are you using some other mechanisme to detect settings?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

eZ debug

Timing: Jan 18 2025 19:11:35
Script start
Timing: Jan 18 2025 19:11:35
Module start 'content'
Timing: Jan 18 2025 19:11:36
Module end 'content'
Timing: Jan 18 2025 19:11:37
Script end

Main resources:

Total runtime1.2218 sec
Peak memory usage4,096.0000 KB
Database Queries191

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.7422180.8438
Module start 'content' 0.00701.0007 769.5859541.8047
Module end 'content' 1.00760.2140 1,311.3906332.7578
Script end 1.2217  1,644.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3487210.0002
Check MTime0.00160.1275210.0001
Mysql Total
Database connection0.00080.069010.0008
Mysqli_queries1.133292.75051910.0059
Looping result0.00260.21291890.0000
Template Total1.187997.220.5940
Template load0.00200.166420.0010
Template processing1.185997.061120.5929
Template load and register function0.00010.012010.0001
states
state_id_array0.00210.172810.0021
state_identifier_array0.00140.111820.0007
Override
Cache load0.00170.1398360.0000
Sytem overhead
Fetch class attribute can translate value0.00120.100730.0004
Fetch class attribute name0.00130.106930.0004
XML
Image XML parsing0.00100.082630.0003
class_abstraction
Instantiating content class attribute0.00000.000530.0000
General
dbfile0.00540.4384280.0002
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
2content/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
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs