Difference between revisions of "Template:News"

154 bytes added ,  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.
(Created to make including Lusternia news links easier.)
 
m (Ok, the last one made the syntax help appear. I guess I need both tags to get the behavior I want.)
 
(7 intermediate revisions by the same user not shown)
Line 4: Line 4:


==Syntax==
==Syntax==
<code><nowiki>{{News|<board>|<post>}}</nowiki></code>
<code><nowiki>{{News|<board>|<post>}}</nowiki>


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


<code><nowiki>{{news|post = <post>|board = <board>}}</nowiki></code>
===Parameters===
===Parameters===
<code><board></code> must be the name of a Lusternia news board.
NOTE: parameters must be in order
<code><post></code> must be the number of a post on the news board
:<code><board></code> must be the name of a ''non-faction'' Lusternia news board: <code><nowiki>Public|Announce|Politics|Events|Overhaul</nowiki></code>
:<code><post></code> must be the number of a post on the news board.
 
===Returns===
===Returns===
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>
==Example==
==Example==
<code><nowiki>{{news|Events|488}}</nowiki></code> will look and function 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]


<!-- Between the onlyinclude tags is where the actual template code happens. -->
<includeonly><onlyinclude>[https://www.lusternia.com/news/{{{1}}}/{{{2}}} {{{1}}} #{{{2}}}]</onlyinclude></includeonly>


<includeonly>
[[Category: Templates]]
[https://www.lusternia.com/news/{{{board}}}/{{{post}}} {{{board}}} #{{{post}}}]
</includeonly>
2,562

edits