Template:Addlink/doc: Difference between revisions

From The Sims Wiki, a collaborative database for The Sims series
Jump to navigation Jump to search
Content added Content deleted
(Created page with "{{Lua| * Module:Addlink}} ==Description== This template adds <code><nowiki>[[ ]]</nowiki></code> around text given to it, thus linking it. It...")
 
mNo edit summary
 
Line 7: Line 7:
:<code><nowiki>{{Addlink|[[Foo]]}}</nowiki></code>
:<code><nowiki>{{Addlink|[[Foo]]}}</nowiki></code>


:<code><nowiki>{{tlx|Addlink|Foo}}</nowiki></code>
:<code><nowiki>{{Addlink|Foo}}</nowiki></code>


Both produce:
Both produce:

Latest revision as of 20:03, 30 April 2019

This template uses Lua

Description[edit source]

This template adds [[ ]] around text given to it, thus linking it. It will ignore text if it sees that [[ ]] is already present.

Usage[edit source]

{{Addlink|[[Foo]]}}
{{Addlink|Foo}}

Both produce:

Foo

Piped links also work:

{{Addlink|[[Foo|Bar]]}}
{{Addlink|Foo{{!}}Bar}}

Both produce:

Bar