Forums / Developer / visual/view and visual/edit

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

eZ debug

Timing: Jan 18 2025 19:01:48
Script start
Timing: Jan 18 2025 19:01:48
Module start 'content'
Timing: Jan 18 2025 19:01:49
Module end 'content'
Timing: Jan 18 2025 19:01:49
Script end

Main resources:

Total runtime1.0445 sec
Peak memory usage4,096.0000 KB
Database Queries183

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.7109180.8359
Module start 'content' 0.00730.8645 768.5469419.1094
Module end 'content' 0.87180.1726 1,187.6563333.7891
Script end 1.0444  1,521.4453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.4279210.0002
Check MTime0.00170.1586210.0001
Mysql Total
Database connection0.00250.234910.0025
Mysqli_queries0.951591.10221830.0052
Looping result0.00240.22601810.0000
Template Total0.999295.720.4996
Template load0.00250.239220.0012
Template processing0.996795.428220.4984
Template load and register function0.00030.025710.0003
states
state_id_array0.00370.358010.0037
state_identifier_array0.00110.109020.0006
Override
Cache load0.00210.1995190.0001
Sytem overhead
Fetch class attribute can translate value0.00200.187320.0010
Fetch class attribute name0.00130.123410.0013
XML
Image XML parsing0.00040.036220.0002
class_abstraction
Instantiating content class attribute0.00000.000810.0000
General
dbfile0.01571.5043210.0007
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
1content/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
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs