Forums / Developer / Attend a event / Comment50633

Author Topic

Kristof Coomans

Friday 30 January 2009 6:17:03 am

Comment50633

Hi Steffen

You can do this in the template, by fetching the "attend" objects that have the current user as owner. If the count of the results is 0, you can show the create button, otherwise you can show the current object together with an "edit" button or link.

See http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/content/fetch_functions/list#eztoc87605_0_0_1, under "Filtering on a non-attribute". The current user you can fetch with the user/current_user fetch function, see http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/user/fetch_functions/current_user.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org