Template

Difference between revisions of "Feed"

Line 3: Line 3:
     {{#if:{{{viewall|}}}|[[{{{viewall}}}|{{{title}}}]]|{{{title}}}}}
     {{#if:{{{viewall|}}}|[[{{{viewall}}}|{{{title}}}]]|{{{title}}}}}
   </h2>
   </h2>
   <div class="feed-items{{#if:{{{cols|}}}| feed-grid}}"{{#if:{{{cols|}}}| style="--feed-cols:{{{cols}}}"}}>
   <div class="feed-items">
{{#dpl:
{{#dpl:
category          = {{{category|}}}
category          = {{{category|}}}
namespace          = {{#if:{{{category|}}}{{{namespace|}}}|{{{namespace|}}}|Main}}
namespace          = {{{namespace|}}}
notcategory        = {{{exclude|}}}
notcategory        = {{{exclude|}}}
count              = {{{count|3}}}
count              = {{{count|3}}}
order              = descending
order              = descending
ordermethod        = lastedit
ordermethod        = lastedit
format            = ,{{FeedItem|page=%PAGE%|title=%TITLE%|image={{#var:feedimage}}|desc={{#var:feeddesc}}|style={{{style|overlay}}}|cta={{{cta|}}}|ctalabel={{{ctalabel|}}}|actions={{{actions|}}}\n}},,
format            = ,{{FeedItem|page=%PAGE%|title=%TITLE%|image={{#var:feedimage}}|desc={{#var:feeddesc}}\n}},,
}}
}}
   </div>
   </div>
</div></includeonly><noinclude>
</div></includeonly><noinclude>
Usage: {{Feed|title=Latest Pages|count=3|mode=preview|viewall=Feed:AllPages}}
'''Usage:'''
Parameters: title, category, namespace, exclude, count, mode, viewall, cols, style, cta, ctalabel, actions.
<pre>
If neither category nor namespace is given, the feed defaults to the Main (article) namespace.
{{Feed
|title=Latest Camping Blog Posts
|category=Camping
|count=3
|mode=preview
|viewall=Feed:Camping
}}
</pre>
 
Parameters:
* title   - heading shown above the feed, and the clickable link text
* category - only show pages in this category (leave blank for all pages/namespace)
* namespace- restrict to a namespace, e.g. Blog if you create one later
* exclude  - optional category to exclude
* count   - how many items to show (3 for homepage, higher for a "view all" page)
* mode     - preview (homepage row) or full (the dedicated feed page)
* viewall - page name the title links to, showing the complete feed
</noinclude>
</noinclude>

Revision as of 04:17, 13 October 2026

Usage:

{{Feed
|title=Latest Camping Blog Posts
|category=Camping
|count=3
|mode=preview
|viewall=Feed:Camping
}}

Parameters:

  • title - heading shown above the feed, and the clickable link text
  • category - only show pages in this category (leave blank for all pages/namespace)
  • namespace- restrict to a namespace, e.g. Blog if you create one later
  • exclude - optional category to exclude
  • count - how many items to show (3 for homepage, higher for a "view all" page)
  • mode - preview (homepage row) or full (the dedicated feed page)
  • viewall - page name the title links to, showing the complete feed