doc/book/en/development/webstdlib/xmlrss.rst
brancholdstable
changeset 5422 0865e1e90674
parent 4985 02b52bf9f5f8
parent 5421 8167de96c523
child 5424 8ecbcbff9777
equal deleted inserted replaced
4985:02b52bf9f5f8 5422:0865e1e90674
     1 .. _XmlAndRss:
       
     2 
       
     3 XML and RSS views (:mod:`cubicweb.web.views.xmlrss`)
       
     4 ----------------------------------------------------
       
     5 
       
     6 Overview
       
     7 +++++++++
       
     8 
       
     9 *rss*
       
    10     Creates a RSS/XML view and call the view `rssitem` for each entity of
       
    11     the result set.
       
    12 
       
    13 *rssitem*
       
    14     Create a RSS/XML view for each entity based on the results of the dublin core
       
    15     methods of the entity (`dc_*`)
       
    16 
       
    17 
       
    18 RSS Channel Example
       
    19 ++++++++++++++++++++
       
    20 
       
    21 Assuming you have several blog entries, click on the title of the
       
    22 search box in the left column. A larger search box should appear. Enter::
       
    23 
       
    24    Any X ORDERBY D WHERE X is BlogEntry, X creation_date D
       
    25 
       
    26 and you get a list of blog entries.
       
    27 
       
    28 Click on your login at the top right corner. Chose "user preferences",
       
    29 then "boxes", then "possible views box" and check "visible = yes"
       
    30 before validating your changes.
       
    31 
       
    32 Enter the same query in the search box and you will see the same list,
       
    33 plus a box titled "possible views" in the left column. Click on
       
    34 "entityview", then "RSS".
       
    35 
       
    36 You just applied the "RSS" view to the RQL selection you requested.
       
    37 
       
    38 That's it, you have a RSS channel for your blog.
       
    39 
       
    40 Try again with::
       
    41 
       
    42     Any X ORDERBY D WHERE X is BlogEntry, X creation_date D,
       
    43     X entry_of B, B title "MyLife"
       
    44 
       
    45 Another RSS channel, but a bit more focused.
       
    46 
       
    47 A last one for the road::
       
    48 
       
    49     Any C ORDERBY D WHERE C is Comment, C creation_date D LIMIT 15
       
    50 
       
    51 displayed with the RSS view, that's a channel for the last fifteen
       
    52 comments posted.
       
    53 
       
    54 [WRITE ME]
       
    55 
       
    56 * show that the RSS view can be used to display an ordered selection
       
    57   of blog entries, thus providing a RSS channel
       
    58 
       
    59 * show that a different selection (by category) means a different channel
       
    60 
       
    61 
       
    62