Overriding RSS Export format

Author Message

Lando C

Friday 24 October 2008 1:03:33 pm

From what I can tell, when using the built in eZ rss export of content, the resulting XML that is output is built by 'ezrssexport.php' (as opposed to an eZ template doing the formatting).

Is this correct or am I looking in the wrong spot?

Basically, I would like to format the export to my own standards without touching any kernel files. Is this possible?

Thanks!

Gaetano Giunta

Friday 24 October 2008 1:53:18 pm

One option you have is to build rss feeds by creating templates.

It will take a while, compared to the standard rss functionality, but it can be done quite easily:
- use the layout/set module to set up an xml http content-type and xml pagelayout (1 template)
- define a node that will be rss "root". full_rss view for it iterates on first X children (or on related objects), sorted by reverse update time, and displays them in line_rss mode (total: 2 templates)
- create url-aliases to have nicer urls for your rss feeds
- make sure that your full_rss view mode is cached (CachedViewModes in site.ini) for good perfs

Principal Consultant International Business
Member of the Community Project Board

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:09:50
Script start
Timing: Jan 18 2025 16:09:50
Module start 'layout'
Timing: Jan 18 2025 16:09:50
Module start 'content'
Timing: Jan 18 2025 16:09:50
Module end 'content'
Timing: Jan 18 2025 16:09:50
Script end

Main resources:

Total runtime0.0158 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 587.9141152.6250
Module start 'layout' 0.00620.0029 740.539139.4453
Module start 'content' 0.00910.0048 779.984489.3203
Module end 'content' 0.01390.0019 869.304730.3047
Script end 0.0157  899.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002515.9394140.0002
Check MTime0.00117.1315140.0001
Mysql Total
Database connection0.00095.446110.0009
Mysqli_queries0.002616.401930.0009
Looping result0.00000.087710.0000
Template Total0.001610.010.0016
Template load0.00085.110610.0008
Template processing0.00084.818810.0008
Override
Cache load0.00063.633810.0006
General
dbfile0.00031.857780.0000
String conversion0.00000.057440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs