Front end editing and the web site toolbar

Author Message

STEVO +

Thursday 03 March 2011 1:07:08 pm

Sorry - forgot to mention that the extension doesn't override attribute_view_gui and node_view_gui but adds new template functions that wrap them - so you'll currently have to do a search + replace throughout all relevant templates - ezwebin, ezflow, custom frontent templates.
Change attribute_view_gui to attribute_sedit_gui
Change node_view_gui to node_sedit_gui
Also there's a couple of regex search/replaces in /temp/regex.txt that should be used for full effect.
The toolbar button doesn't do anything yet.
Clear all caches etc then you should see divs as mentioned above wrapping content areas and rolling over them will reveal the icons.
Cheers

Eirik Alfstad Johansen

Sunday 10 July 2011 1:59:13 pm

OK, so I've been doing some more research on this, and allthough I think that most functionality can be handled by an extension, I think a small kernel modification will result in the best implementation of this functionality. 

Here is what I propose: 

  • The ability to have a template surrounding the templates produced by attribute_view_gui, node_view_gui and other template functions making use of the eZObjectForwarder class (check out kernel/common/eztemplateautoload.php).
  • The names of these templates could be an underscore, followed by the name of the template function, followed by «.tpl» and the template could be placed in the same folder as the template_root of the specific template function (or in the matching template root for those functions which make us of the multi_match template_root type, like attribute_view_gui). To use node_view_gui as an example, the surrounding template would be located in design/standard/templates/node/view/_node_view_gui.tpl. An alternative placement is to have them all in a content/inlineedit template folder. In this case, the node_view_gui template would be located in design/standard/templates/content/inlineedit/node_view_gui.tpl
  • These surrounding templates will only be invoked if a new InlineEditing INI setting is set to enabled/true.
  • The variables accessible in the surrounding template should be the same as the ones that are accessible in the included template.

I was hoping to accomplish this myself, but looking into kernel/common/ezobjectforwarder.php, the class it's quite daunting and not very well documented. So, I was hoping that someone would be able to give me a hand with this before I embark upon the rest of the task.

Any takers?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eirik Alfstad Johansen

Monday 11 July 2011 12:30:45 pm

Having taken a closer look at STEVO's project, I can see that he has in fact gone with a very similar approach to the one described above.

However, I'm stilling having trouble getting it to work properly (meaning seeing the icons when I hover over an attribute).

As far as I can tell, there's nothing that actually included the sedit.js file (which I assume holds the logic behind this), so I've added it to JavaScriptSettings > FrontendJavaScriptList of the design.ini file.

I've checked the source to ensure that both sedit.js and YUI are included, but still nothing happens when I hover over an attribute_view_gui which has been replaced with attribute_sedit_gui (and yes, the HTML for the attribute_sedit_gui does get included).

How to troubleshoot from here?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

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