Create view in admin interface?

Author Message

Rinze Cats

Friday 12 November 2004 7:42:48 am

Hello,

For an editor i want to create a view displaying a list of links to all instances of a certain class in my site. I want this list to be available in the admin interface, but I have no idea on how to go about it.

all help is greatly appreciated

Randeep Walia

Sunday 14 November 2004 10:10:22 pm

The place to start is looking at some of the other admin interface templates. These will give you an idea of how the default displays for various class items are generated. Also check out the documentation for the fetch function at http://ez.no/ez_publish/documentation/list/(from)/44331 along with examples in the templates. Fetching for objects of a specific class is pretty trivial and works something like this:

{let children=fetch( content, list, hash( parent_node_id, $node.node_id,
sort_by, $node.sort_array,
class_filter_type, include,
class_filter_array, array( 'article' ) ) )}

to only get instances of the article class.

__________________________________
Randeep Walia is http://www.rundeep.net powered by EZ Publish

Rinze Cats

Wednesday 17 November 2004 12:51:32 am

Hi, and thanx for the reply!

The code itself is trivial indeed. I have had a look at the admin templates, but really need some pointers on how to go about it. For instance: I can add an item to the menu under the setup tab, but don't know how to create the content page for the link.

I have the code the does exactly what I need, I just don't know how to add it to the admin interface (cause I can't add content the way I add content to the user site). So I guess the real question is: how can I link the template to a url in the admin interface?

this can't be too hard, can it?

greetz
rinze

Rinze Cats

Monday 22 November 2004 2:28:12 am

sorry, but *kick*

this problem is still open and I really need a sollution or some pointers. anybody?

thanx
rinze

Jade Tremblay

Wednesday 01 December 2004 4:50:51 pm

Correct me if I'm wrong, I think that you will need to add a new module to the ezpublish kernel. A module is composed of Business logic(php code) and User Interface(template). Look at BL examples in kernel/ directory. The code in the business logic calls template to generate output. Start by looking at the notification module as is it quite simple. Start from the module definition /kernel/moduleName/module.php, this does the link with other BL files.

Hope this help,

Jade Tremblay
Directeur Technologique

Perséides Technologie
www.perseidestech.net
Passez du rêve à la réalité!

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