Forums / Setup & design / Subdomain per section of the content tree?

Subdomain per section of the content tree?

Author Message

Carlos Revillo

Monday 27 October 2008 4:44:22 am

Hi. This is maybe a following to http://ez.no/developer/forum/setup_design/one_subdomain_per_each_user_blog

I'll try to explain. We have a content tree like

Root
-- News
-- Contact
-- Company
-- Forum
-- Blogs

We want a subdomain for the "blogs" section. something like blogs.domain.com

So, i have added some lines to my site.ini file

HostMatchMapItems[]=blogs.domain;blogs

and i've created a siteaccess called also blogs.
In this new siteaccess i've added override.ini.append.php file and site.ini.append.php with

IndexPage=/content/view/full/5681

All is perfect but my doubts begins now.

we have a main menu template. is a list of the folders under the content tree. usign ezurl operator we get urls like http://www.domain.com/news, http://www.domain.com/company and so on.

But when i go to blogs.domain.com, ezurl operator converts those urls to http://blogs.domain.com/company for example, and this is not what we want.

so, is there any way to keep those urls like http://www.domain.com/company and only the urls of the nodes in "blog tree" displaying urls like http://blogs.domain.com/whatever...

Andrew Duck

Monday 27 October 2008 6:01:31 am

Hi Carlos,

From memory I don't believe ezurl() takes into account the SiteURL setting within the [SiteSettings] block in site.ini. If this is infact the case then the domain name would be based on HTTP_HOST which is an environment variable defined by Apache.

To work around this you would have to customise your menu template and conditionally change those URLs for specific subtrees.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Andrew Duck

Monday 27 October 2008 6:04:36 am

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_operators/urls/ezurl

Gaetano mentions this in a comment on the ezurl documentation page. :)

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Carlos Revillo

Monday 27 October 2008 6:10:54 am

I see. And i also have read the comment from Gaetano.

Then we'll need to hack main menu template for this.

Thank you again!

eZ debug

Timing: Jan 19 2025 00:24:03
Script start
Timing: Jan 19 2025 00:24:03
Module start 'content'
Timing: Jan 19 2025 00:24:04
Module end 'content'
Timing: Jan 19 2025 00:24:04
Script end

Main resources:

Total runtime0.7968 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 588.9609180.8125
Module start 'content' 0.00780.6791 769.7734558.7656
Module end 'content' 0.68690.1098 1,328.5391336.7422
Script end 0.7967  1,665.2813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4586210.0002
Check MTime0.00140.1735210.0001
Mysql Total
Database connection0.00070.083710.0007
Mysqli_queries0.729291.51751970.0037
Looping result0.00170.21281950.0000
Template Total0.769096.520.3845
Template load0.00210.264620.0011
Template processing0.766896.245520.3834
Template load and register function0.00020.028510.0002
states
state_id_array0.00070.092110.0007
state_identifier_array0.00070.084220.0003
Override
Cache load0.00170.2176290.0001
Sytem overhead
Fetch class attribute can translate value0.00090.118630.0003
Fetch class attribute name0.00100.127050.0002
XML
Image XML parsing0.00080.100330.0003
class_abstraction
Instantiating content class attribute0.00000.001560.0000
General
dbfile0.00330.4105290.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/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
2content/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: 19
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs