Difference between revisions of "Template:News"

411 bytes removed ,  00:29, 10 July 2022
m
Ok, the last one made the syntax help appear. I guess I need both tags to get the behavior I want.
m (Fixing the mistake I made when I added the comment.)
m (Ok, the last one made the syntax help appear. I guess I need both tags to get the behavior I want.)
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
<code><nowiki>{{News|<board>|<post>}}</nowiki>
<code><nowiki>{{News|<board>|<post>}}</nowiki>


<nowiki>{{news|<board>|<post>}}</nowiki>
<nowiki>{{news|<board>|<post>}}</nowiki></code>
 
<nowiki>{{news|<board>}}</nowiki>
 
<nowiki>{{news}}</nowiki></code>


===Parameters===
===Parameters===
Line 20: Line 16:
This appears on the page as an external link of the form: <board> #<post>
This appears on the page as an external link of the form: <board> #<post>


==Examples==
==Example==
#<code><nowiki>{{news|Events|488}}</nowiki></code> will go to Events 488 and look like: [https://www.lusternia.com/news/events/488/ Events #488]
<code><nowiki>{{news|Events|488}}</nowiki></code> will go to Events 488 and look like: [https://www.lusternia.com/news/events/488/ Events #488]
#<code><nowiki>{{news|Announce}}</nowiki></code> will go to a page displaying the 40 most recent Announce posts and look like: [https://www.lusternia.com/news/Announce/ Announce]
 
#<code><nowiki>{{news}}</nowiki></code> will go to a page displaying the news boards and will appear as an auto-numbered, anonymous link: <onlyinclude>[https://www.lusternia.com/news/{{{1|}}}/{{{2|}}} {{{1|}}} {{#if:#{{{2|}}} }}]</onlyinclude>
<!-- Between the onlyinclude tags is where the actual template code happens. -->
<includeonly><onlyinclude>[https://www.lusternia.com/news/{{{1}}}/{{{2}}} {{{1}}} #{{{2}}}]</onlyinclude></includeonly>
<!-- The part between the <onlyinclude></onlyinclude> tags in Example 3 is where all the actual template code happens. -->


[[Category: Templates]]
[[Category: Templates]]
2,562

edits