Jump to content

Template:GuestbookWidget: Difference between revisions

From LovedForever
Home page redesign deploy
Detect /Stories by title text (main namespace has no subpages enabled on live)
 
Line 1: Line 1:
<div class="guestbook-form-widget" data-guestbook-subpage="{{FULLPAGENAME}}"></div>{{#ifeq:{{SUBPAGENAME}}|Stories|[[Category:Stories|{{BASEPAGENAME}}]]}}
<div class="guestbook-form-widget" data-guestbook-subpage="{{FULLPAGENAME}}"></div>{{#ifeq:{{#titleparts:{{PAGENAME}}|1|-1}}|Stories|[[Category:Stories|{{#titleparts:{{PAGENAME}}|-1}}]]}}
<noinclude>
<noinclude>
Drop <code><nowiki>{{GuestbookWidget}}</nowiki></code> at the <strong>bottom</strong> of a
Drop <code><nowiki>{{GuestbookWidget}}</nowiki></code> at the <strong>bottom</strong> of a

Latest revision as of 02:19, 24 October 2026

Drop {{GuestbookWidget}} at the bottom of a memorial's own "PersonName/Stories" subpage, below any existing entries -- not the main memorial page. Visitors read the existing stories first, then find the form last. It renders a native submission form (built by MediaWiki:Common.js) that posts

new entries onto *this* page as

A Visitor



entries, inserted directly above this transclusion (not simply appended to the end of the page) so the form stays pinned at the bottom as more entries are added -- since the existing entries on the page are simply the rest of its wikitext, there is no separate storage subpage any more.

A "Stories" tab pointing at this subpage is added automatically to the parent memorial page (see the SkinTemplateNavigation::Universal hook in LocalSettings.php) for every main-namespace page, as a redlink until its "/Stories" subpage actually exists.

Posting is open to anyone, logged in or not -- anonymous visitors can post text, but the photo-upload button is disabled for them (MediaWiki's default permissions don't grant anonymous users the "upload" right).