Template

Difference between revisions of "Feed"

Line 6: Line 6:
{{#dpl:
{{#dpl:
category          = {{{category|}}}
category          = {{{category|}}}
namespace          = {{{namespace|}}}
namespace          = {{#if:{{{category|}}}{{{namespace|}}}|{{{namespace|}}}|Main}}
notcategory        = {{{exclude|}}}
notcategory        = {{{exclude|}}}
count              = {{{count|3}}}
count              = {{{count|3}}}
Line 15: Line 15:
   </div>
   </div>
</div></includeonly><noinclude>
</div></includeonly><noinclude>
'''Usage (unchanged parameters):'''
Usage: {{Feed|title=Latest Pages|count=3|mode=preview|viewall=Feed:AllPages}}
* title, category, namespace, exclude, count, mode, viewall — same as before.
Parameters: title, category, namespace, exclude, count, mode, viewall, cols, style, cta, ctalabel, actions.
 
If neither category nor namespace is given, the feed defaults to the Main (article) namespace.
'''New optional parameters:'''
* '''cols''' — number of columns on wide screens. Leave blank for the
  original default (3, via the existing flexible layout). Set to a
  number (e.g. <code>cols=2</code> or <code>cols=4</code>) to use a
  strict grid with that many columns instead.
* '''style''' — visual style of each card:
** (blank / not set) — original look: title overlaid on the photo,
  description below it. Unchanged from before.
** <code>overlaytop</code> — title across the TOP of the photo,
  description across the BOTTOM of the photo (both over the image).
** <code>side</code> — photo alone on the left, title and description
  stacked on the right, nothing written over the image. Intended for
  one-column "view all" style pages.
* '''cta''' — a URL. If set, adds a small button to every card in this
  feed. Combine with '''ctalabel''' for the button's text (default:
  "Learn more").
* '''actions''' — set to <code>1</code> to add placeholder like/share
  icon buttons to every card in this feed. (These are visual only —
  no click behavior is wired up yet, since the action wasn't defined.)
 
'''Examples:'''
<pre>
{{Feed|title=Latest Camping Blog Posts|category=Camping|count=3|mode=preview|viewall=Feed:Camping}}
    -> exactly like before, 3 across, title-over-image style
 
{{Feed|title=Latest Camping Blog Posts|category=Camping|count=3|cols=4}}
    -> same style, but 4 across instead of 3
 
{{Feed|title=Latest Camping Blog Posts|category=Camping|count=50|mode=full|style=side}}
    -> "view all" page, one per row, photo left / text right
 
{{Feed|title=Latest Camping Blog Posts|category=Camping|count=3|style=overlaytop|cta=https://example.com/book|ctalabel=Book Now|actions=1}}
    -> title-top/desc-bottom over the photo, plus a "Book Now" button
      and like/share icons on every card
</pre>
</noinclude>
</noinclude>

Revision as of 21:46, 13 October 2026

Usage:

Latest Pages

Extension:DynamicPageList (DPL), version 3.3.7: Error: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants

Parameters: title, category, namespace, exclude, count, mode, viewall, cols, style, cta, ctalabel, actions. If neither category nor namespace is given, the feed defaults to the Main (article) namespace.