custom classes and edition in user siteaccess

Author Message

Guillaume Clapier

Friday 12 January 2007 7:13:39 am

Hello

I am having a REALLY hard time with the custom classes that I create. I successfully use the override function to print my class in my user siteaccess using /design/{siteaccess}override/templates then |full|line etc...

I have noticed there is and edit folder in there as well, which i intended to use. I also have modfied the override.ini.append.php file for all the views that i need, including edit.
BUT (there's always a but somewhere) the toolbar that says edit|remove etc.. never shows up in the full view for the objects I have created myself, and its driving me crazy!

At first I thought it was a problem of right, but it is defenitly NOT that (it does that even with an admin user that has rights set to all modules allfunctions no limits).

Any ideas, links, whatever is useful that could help me out there?

Thank you,
G

Eirik Alfstad Johansen

Tuesday 16 January 2007 9:22:35 am

Hi Guillaume,

I'm guessing that when you have created your overrides, you have based them upon copies of the default templates which, among other things, include buttons for editing/removing the object (at least the default node/view/full.tpl).

If you take a closer look at your overrides, you should be able to find the buttons near the bottom of the code.

A little tip: When I create overrides, I usually do it through the admin interface, basing the override on either "Container (with children)" or "View (without children)" depending on whether I'm overriding full.tpl or line.tpl. I find that this gives me a much better starting point than copying the default template.

Sincerely,

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

Guillaume Clapier

Wednesday 17 January 2007 9:13:12 am

Well thank you for your answer Eirik,

actually I have been on the problem for a while and I think I understand what is going on better now. I do not think it is a problem with the templates I used (I do not edit them through the web interface but via ssh directly on my server, copying the template I find closer to what I will be doing and modifying it), because I found that the file that displays the toolbar is websitetoolbar.tpl .
I managed (with some help) to locate the problem which lies in the $available_for_classes variable rather. It seems one needs to create a file 'websitetoolbar.ini' and you have to add your classes up in there. When the program goes through the websitetoolbar.tpl the $available_for_classes will contain you class and thus the condition will be true, and the program will enter the condition, displaying the toolbar. For the moment I have not found the correct syntax for the ini file, I simply put the $available_for_classes variable to true, up until I find a way to write the file down correctly (I am still very new to EZ), and it works fine, underlying the fact that this variable was the one causing the problem.
Now maybe when you make a new template through the website interface it automatically adds your class to the ini file, I don't know I'll have to check that out, but the problem is that I haven't found any documentation at all on this aspect of the program, so I am wondering how people do when they make new classes whose instances need to be edited by users really.
I am still working on EZ 3.9RC2, though.

Thank you,
Guillaume

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