visual/view and visual/edit

Author Message

Eric Bourgain

Saturday 03 December 2005 8:45:35 am

Hi everybody,

I continue with my extension to let the user choose its own colors. The idea is that the "user" (ako webmaster) may want to add a folder at top, and I want to let him choose the look of its new subtree: colors, header image, etc...
To achieve this goal, I have added new attributes to the folder (and some other classes of my own, but let's say the folder) that can handle the colors and background of the various items that may appear. They are quite a lot. I have designed a way to define the color set of the site (I've another post open on it), and to select the colors either from this set, or to give a string. I can generate css files from these attributes. I have overriden the templates to deal with them, so that they are editable only when it is pertinent, etc.
Now, as they are a lot, I want to be able to deal with the colors from the "design" tab, not from the "contents" tab.
I have added a contentstructuremenu in the visual template for a start, that shows only the nodes that have design information.

<i>First problem</i>
But when I see them (view), I always fall back to the 'content' navigation part. That's not the case for the user navigation part, but I was unable to find how it was done.

<i>Second problem</i>
I have a specific template to show the nodes in the visual part. To be able to use it, I have to be able to detect that I am in this part. Although my url is /visual/view/id, I am unable to find a way to get this information. How can I get it?

<i>To follow</i>
I suppose that I will have similar problems when I will come to edit the objects.

But I would like not to copy the edit.php, nor the view.php files, for at least one reason: I'not sure of how to integrate them (it's kernel feature).
I was hoping to be able to deal with this with template override and parameters.
Is there a way to do this?

Has anybody any idea about this?
Thanx a lot

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:12:43
Script start
Timing: Jan 31 2025 06:12:43
Module start 'layout'
Timing: Jan 31 2025 06:12:43
Module start 'content'
Timing: Jan 31 2025 06:12:43
Module end 'content'
Timing: Jan 31 2025 06:12:43
Script end

Main resources:

Total runtime0.0130 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.0049 588.1328151.2109
Module start 'layout' 0.00490.0023 739.343836.6484
Module start 'content' 0.00730.0043 775.992290.0313
Module end 'content' 0.01160.0014 866.023429.9922
Script end 0.0130  896.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002216.6177140.0002
Check MTime0.00107.7052140.0001
Mysql Total
Database connection0.00097.233610.0009
Mysqli_queries0.002620.117130.0009
Looping result0.00000.100910.0000
Template Total0.00108.010.0010
Template load0.00086.512410.0008
Template processing0.00021.501010.0002
Override
Cache load0.00064.464510.0006
General
dbfile0.00107.708880.0001
String conversion0.00000.051440.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