[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/rss_client/templates/ -> feed.mustache (source)

   1  {{!
   2      This file is part of Moodle - http://moodle.org/
   3  
   4      Moodle is free software: you can redistribute it and/or modify
   5      it under the terms of the GNU General Public License as published by
   6      the Free Software Foundation, either version 3 of the License, or
   7      (at your option) any later version.
   8  
   9      Moodle is distributed in the hope that it will be useful,
  10      but WITHOUT ANY WARRANTY; without even the implied warranty of
  11      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12      GNU General Public License for more details.
  13  
  14      You should have received a copy of the GNU General Public License
  15      along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  16  }}
  17  {{!
  18      @template block_rss_client/feed
  19  
  20      Template which defines an item in an RSS Feed
  21  
  22      Classes required for JS:
  23      * none
  24  
  25      Data attributes required for JS:
  26      * none
  27  
  28      Context variables required for this template:
  29      * channel_image - object: URL, title and link for the channel image.
  30      * title - string: The title of the feed.
  31      * items - array: An array of feed items.
  32  
  33      Example context (json):
  34      {
  35          "title": "News from around my living room",
  36          "image": {
  37              "url": "https://www.example.com/feeds/news/poster.jpg",
  38              "title": "Example News Logo",
  39              "link": "https://www.example.com/feeds/news/"
  40          },
  41          "feeditems": [
  42              {
  43                  "id": "https://www.example.com/node/12",
  44                  "link": "https://www.example.com/my-turtle-story.html",
  45                  "title": "My Turtle Story",
  46                  "description": "This is a story about my turtle.",
  47                  "permalink": "https://www.example.com/my-turtle-story.html",
  48                  "datepublished": "11 January 2016, 7:11 pm"
  49              },
  50              {
  51                  "id": "https://www.example.com/node/12",
  52                  "link": "https://www.example.com/my-cat-story.html",
  53                  "title": "My Story",
  54                  "description": "This is a story about my cats.",
  55                  "permalink": "https://www.example.com/my-cat-story.html",
  56                  "datepublished": "12 January 2016, 9:12 pm"
  57              }
  58          ]
  59      }
  60  }}
  61  {{$image}}
  62      {{#image}}
  63          {{> block_rss_client/channel_image}}
  64      {{/image}}
  65  {{/image}}
  66  
  67  {{$title}}
  68      {{#title}}
  69          <div class="title">{{feedtitle}}</div>
  70      {{/title}}
  71  {{/title}}
  72  
  73  {{$items}}
  74      <ul class="list no-overflow">
  75          {{#items}}
  76              {{> block_rss_client/item}}
  77          {{/items}}
  78      </ul>
  79  {{/items}}


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1