doc/book/en/development/webstdlib/xmlrss.rst
brancholdstable
changeset 4985 02b52bf9f5f8
parent 4744 0772d4e29d52
equal deleted inserted replaced
4563:c25da7573ebd 4985:02b52bf9f5f8
     1 .. _XmlAndRss:
     1 .. _XmlAndRss:
     2 
     2 
     3 XML and RSS views (:mod:`cubicweb.web.views.xmlrss`)
     3 XML and RSS views (:mod:`cubicweb.web.views.xmlrss`)
     4 ----------------------------------------------------
     4 ----------------------------------------------------
       
     5 
       
     6 Overview
       
     7 +++++++++
     5 
     8 
     6 *rss*
     9 *rss*
     7     Creates a RSS/XML view and call the view `rssitem` for each entity of
    10     Creates a RSS/XML view and call the view `rssitem` for each entity of
     8     the result set.
    11     the result set.
     9 
    12 
    10 *rssitem*
    13 *rssitem*
    11     Create a RSS/XML view for each entity based on the results of the dublin core
    14     Create a RSS/XML view for each entity based on the results of the dublin core
    12     methods of the entity (`dc_*`)
    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