Specific Content with Specific Site Design: Round 2

Author Message

RW Wood

Friday 19 September 2003 5:40:58 pm

As I gradually get the hang of version 3, I still haven't seen a solution for this problem: I have a site that is divided into several sections, each representing a country. The site designs for every country are identical with the exception of some minor things like a banner image and colors that are set by a style sheet. I can essentially make changes site wide to the layout by simply changing the pagelayout.tpl that I have set as the "standard". If I plug www.mysite.com/index.php/argentina into the browser, the argentina site design folder gets accessed, and the right image and style sheet are used. If I change to another country in the browser bar, that country's images and stylesheet get used.

The problem is, I want certain articles and other content to be viewable only via one country's site design. In other words, if I post an article on Argentina's beef industry, I don't want it viewable in the Peru site design, but only in the Argentina site design. So far no one has been able to tell me how to accomplish this unless I use many pagelayout.tpl files naming them peru_pagelayout.tpl, etc. That means changing everyone of them eveytime I wan't to make a site wide layout change, add a new include, or whatever.

It seems that there must be a relatively easy way to do this, but as much as I've searched the docs, I have not been able to find an answer. I have everything else, including multilanguages working, but I can't figure out how to separate content based on site design.

Thanks for any and all help.
RWW

Bård Farstad

Monday 22 September 2003 7:46:30 am

Currently this is "not supported" however it's quite possible to do. Normally you should only have one admin with ContentObject locale=eng-GB (or whatever is the main/default translation). Objects created on this admin site will then be visible on all translated sites.

If you then create one admin interface for each site with ConentObjectLocate=nor-NO (your current locale), you will be able to create objects which only are visible in that language.

This works, but it's actually a mis-configuration and not an intended feature. Mabye we can just call it a new feature? ;)

Hope this helps,

--bård

Documentation: http://ez.no/doc

RW Wood

Monday 22 September 2003 8:49:57 am

Bård,

Thanks for your reply, however the language issue for me is not the issue :) What is the issue, is the inability to have, for example, articles related to Argentina show up **only** with the Argentina site design. In version 2, I accomplished this by giving each country its own section, site design, and category. That of course mandated maintaining a pagelayout template for each country.

I was hoping that with the override system, I could get away from separate templates for each site design and only have small pieces to maintain individually.

Isn't there any way to direct ezP to use a specific site.ini.append based on which folder or article is selected?

RW Wood

Monday 22 September 2003 7:37:58 pm

I figured a work around to the problem described in the URL above: replace the folder specific sections with a hard coded url that's then put in an included file. Assign a section to each folder and use an site wide override template for each section that's different. Since fortunately there were only two includes needed for each site design, it wasn't much work.

Hope this helps someone else figure out this problem.
RWW

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:53:30
Script start
Timing: Jan 31 2025 06:53:30
Module start 'layout'
Timing: Jan 31 2025 06:53:30
Module start 'content'
Timing: Jan 31 2025 06:53:30
Module end 'content'
Timing: Jan 31 2025 06:53:30
Script end

Main resources:

Total runtime0.0167 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 589.6328151.2266
Module start 'layout' 0.00420.0027 740.859436.6797
Module start 'content' 0.00690.0084 777.539194.1875
Module end 'content' 0.01530.0013 871.726633.9922
Script end 0.0166  905.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002112.6375140.0002
Check MTime0.00105.9297140.0001
Mysql Total
Database connection0.00073.928810.0007
Mysqli_queries0.002313.534230.0008
Looping result0.00000.216010.0000
Template Total0.00095.710.0009
Template load0.00074.264910.0007
Template processing0.00021.404510.0002
Override
Cache load0.00052.897610.0005
General
dbfile0.004325.967280.0005
String conversion0.00000.052940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs