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.

eZ debug

Timing: Jan 18 2025 16:19:52
Script start
Timing: Jan 18 2025 16:19:52
Module start 'layout'
Timing: Jan 18 2025 16:19:52
Module start 'content'
Timing: Jan 18 2025 16:19:53
Module end 'content'
Timing: Jan 18 2025 16:19:53
Script end

Main resources:

Total runtime0.8979 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.9063152.6250
Module start 'layout' 0.00660.0039 740.531339.4453
Module start 'content' 0.01050.8859 779.9766596.8047
Module end 'content' 0.89640.0015 1,376.781312.1641
Script end 0.8979  1,388.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4217160.0002
Check MTime0.00160.1829160.0001
Mysql Total
Database connection0.00080.092710.0008
Mysqli_queries0.838593.3790650.0129
Looping result0.00060.0720630.0000
Template Total0.861395.920.4307
Template load0.00220.249320.0011
Template processing0.859195.668820.4295
Template load and register function0.00020.022210.0002
states
state_id_array0.00120.130110.0012
state_identifier_array0.00070.082120.0004
Override
Cache load0.00180.2055300.0001
Sytem overhead
Fetch class attribute can translate value0.00260.293730.0009
Fetch class attribute name0.00110.117170.0002
XML
Image XML parsing0.00270.297630.0009
class_abstraction
Instantiating content class attribute0.00000.001470.0000
General
dbfile0.00240.2698220.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs