Author
|
Message
|
Clemens T
|
Saturday 08 October 2005 8:26:06 am
Hey all! I want to be able to let users create objects through the normal ezpublish system, but I don't want to show them all the contentattributes, except for the ones that are admin. like this:
--form
---- name _____
---- city _____
[admin only]
---- priority 1,2,3
---- active 1,0
[/admin only[
---- my telephone number ____
/- form
Thanks, for any comment at all!
Greets, Clemens
|
Xavier Dutoit
|
Sunday 09 October 2005 3:15:17 am
Hi, What I usualy do in these cases is on the custom edit.tpl, fetch the current_user and based on the groups, section show it parts of the template. X+
http://www.sydesy.com
|
Clemens T
|
Sunday 09 October 2005 5:52:59 am
OK, that sounds good. But now I have one remaining problem, how can I get a link to 'create a new object of this class', without the button and the dropdown?
Greetz, Clemens
|
Gabriel Ambuehl
|
Sunday 09 October 2005 6:25:12 am
Do look at the HTML that is usually used. It's easy to figure out. Just make the selector a hidden form field instead.
Visit http://triligon.org
|
Clemens T
|
Sunday 09 October 2005 7:43:55 am
OK, many thanks to both! Got it.. now what I want to do, is hide some of the attributes, and submit a default value with them. Because I'm now overriding edit_attribute.tpl.. but not there yet.. how should I build this statement and.. more important.. how can I make sure the 'hidden values' are submitted correctly (to ensure default values upon submit).
Thanks, Clemens
|
Xavier Dutoit
|
Sunday 09 October 2005 9:56:42 am
Hi Clemens,
Have a look at this contrib, might do what you want to prefill the content: http://ez.no/community/contribs/hacks/object_creator However, it doesn't solve the validation problem (ie you can change these values easily). If you want to be 100% certain of the values, then create a custom event and put it in the publication workflow. X+
http://www.sydesy.com
|