3.5 Design Look and Feel SiteAccess Selector

Author Message

Luc Chase

Friday 08 April 2005 10:59:49 am

How can I add a SiteAccess Selector to the Look and Feel screen? It's available in several other places and it seems it ought to be there too.

The Web Application Service Provider

Frederik Holljen

Monday 11 April 2005 7:35:54 am

That functionality requires some code to be added. This functionality will most probably be improved for eZ publish 4.0.

Luc Chase

Monday 11 April 2005 1:31:01 pm

Ok, thanks Fredrik. Over the weekend we found how to make it set Look & Feel for the Current SiteAccess only (instead of a Global Override). Two simple line changes in the Kernel. Also, had to change one more line so that the SiteName is also set for the current SiteAccess only. Works well because we already allow simple edits from the user-site SiteAccess, but of course it would still be better if we could use a SiteAccess Selector instead; then it could be used from the Admin SiteAccess instead of only from the user-site SiteAccess.

The Web Application Service Provider

Esteban Rodriguez

Tuesday 12 April 2005 10:05:29 am

I think we've found a "cleaner" way to do this. You have to do it on every site though.
If you edit the "Template Look" class, you'll find that you can choose on which SiteAccess each inisetting will be modified, just pick the siteaccess for the particular site and voilĂ , you're done.

HTH.

Esteban

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

Luc Chase

Tuesday 12 April 2005 3:44:46 pm

Esteban,
yes that is true. But in the method I used you actually get another SiteAccess in the datatype of the class called 'CurrentAccess' (just below 'override')so don't need to edit it for each site.
However, haven't yet found how to make the Banner Image SiteAccess Specific.

The Web Application Service Provider

Esteban Rodriguez

Wednesday 13 April 2005 8:42:49 am

Ok, sounds good.
On the other hand, now I realize that doing what I said we still can't avoid having the Template Look edit the design.ini in the override dir, instead of the one in the current siteaccess.
This is somewhat of a problem, since it makes it harder to administrate several sites with one install.

Any clues?

Esteban

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

Luc Chase

Wednesday 13 April 2005 11:12:16 am

That,a where the three Kernel edits come in. But still working on getting the Logo to be site specific. ThenThe menu layouts next...

The Web Application Service Provider

Esteban Rodriguez

Wednesday 13 April 2005 11:25:30 am

Ok, Luc, could you show me what you edited in the kernel?
I'm generally quite afraid of touching the kernel, since I don't want to spoil upgradeability, but I really need to have this solved.

Thanks,

Esteban

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

Luc Chase

Wednesday 13 April 2005 1:51:49 pm

Ok this is as far as we've got. Remember this only works if you edit while in the site access you want to change (not while in the Admin siteAccess).
Change line 134 of ezpackagetype.php from

$iniPath = "settings/siteaccess/$siteAccess"; 

to

$accessArray = $GLOBALS['eZCurrentAccess'];
$access = $accessArray['name'];
$iniPath = "settings/siteaccess/$access"; 

next change line 332 (I don't know yet if Line 195 might also benefit from a similar change ) of ezinisettingtype.php from

$path = 'settings/siteaccess/'.siteAccessArray[$iniInstance];

to

$path = $iniInstance == 1 ? 'settings/siteaccess/' . $GLOBALS['eZCurrentAccess']['name'] : 'settings/siteaccess/' . $siteAccessArray[$iniInstance];

then change line 601 of the same ezinisettingtype.php file from

$siteAccessList = 'override';

to

$siteAccessList = 'override;currentSite'; 

then edit the sitedesign class (the one for the choice of designs)to use 'currentSite'
We're also making progress with siteAccess specific Logo changes but it's quite long winded and too early to call it a solution.
Please don't blame me if the above totally mucks-up your installation. If and when it's all done, dusted and tested I'll publish the whole thing as a clean extension with instructions etc.

The Web Application Service Provider

Esteban Rodriguez

Wednesday 13 April 2005 2:20:08 pm

Gee, that was quick, thanks for the trouble.
Rest assured I won't blame you if I screw up. I'll post whatever develoments we can get starting off from what you've changed.

thanks,

Esteban

I have great faith in fools; self-confidence my friends call it.

http://presencia.net

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 05:59:54
Script start
Timing: Jan 31 2025 05:59:54
Module start 'layout'
Timing: Jan 31 2025 05:59:54
Module start 'content'
Timing: Jan 31 2025 05:59:55
Module end 'content'
Timing: Jan 31 2025 05:59:55
Script end

Main resources:

Total runtime1.2599 sec
Peak memory usage4,096.0000 KB
Database Queries80

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.2656151.2266
Module start 'layout' 0.00760.0028 739.492236.6797
Module start 'content' 0.01041.2486 776.17191,061.3906
Module end 'content' 1.25910.0008 1,837.562519.8125
Script end 1.2599  1,857.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2646160.0002
Check MTime0.00140.1082160.0001
Mysql Total
Database connection0.00090.070310.0009
Mysqli_queries1.180893.7232800.0148
Looping result0.00070.0574780.0000
Template Total1.212696.220.6063
Template load0.00230.184120.0012
Template processing1.210396.063920.6052
Template load and register function0.00130.101310.0013
states
state_id_array0.00170.136910.0017
state_identifier_array0.00240.186920.0012
Override
Cache load0.00200.1598570.0000
Sytem overhead
Fetch class attribute can translate value0.00060.044030.0002
Fetch class attribute name0.00200.1568120.0002
XML
Image XML parsing0.00470.376830.0016
class_abstraction
Instantiating content class attribute0.00000.0022150.0000
General
dbfile0.00680.5409220.0003
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 46
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs