Template:Link

template purpose
This is a Template for internal and external Links in notation.

Help
see

Motivation
In Mediawiki there are at least five different ways to use a link - we'd like to hide this complexity and add new functionality:
 * 1) Main Page Main Page - internal link with no text
 * 2) Start Page Start Page - internal link with text
 * 3)   - external link as footnote
 * 4) BITPlan partner site BITPlan partner site - external link with text
 * 5) http://partner.bitplan.com http://partner.bitplan.com -  automatic external link

Motivation
The Concept behind a link is Class Link { target title } ' BITPlan Corporate identity skin params ' Copyright (c) 2015 BITPlan GmbH ' see http://wiki.bitplan.com/PlantUmlSkinParams#BITPlanCI ' skinparams generated by com.bitplan.restmodelmanager hide Circle skinparam note{ BackGroundColor #FFFFFF FontSize 14 ArrowColor #FF8000 BorderColor #FF8000 FontColor black FontName Technical }

skinparam component{ BackGroundColor #FFFFFF FontSize 14 ArrowColor #FF8000 BorderColor #FF8000 FontColor black FontName Arial }

skinparam package{ BackGroundColor #FFFFFF FontSize 14 ArrowColor #FF8000 BorderColor #FF8000 FontColor black FontName Arial }

skinparam usecase{ BackGroundColor #FFFFFF FontSize 14 ArrowColor #FF8000 BorderColor #FF8000 FontColor black FontName Arial }

skinparam activity{ BackGroundColor #FFFFFF FontSize 14 ArrowColor #FF8000 BorderColor #FF8000 FontColor black FontName Arial }

skinparam classAttribute{ BackGroundColor #FFFFFF FontSize 14 ArrowColor #FF8000 BorderColor #FF8000 FontColor black FontName Technical }

skinparam interface{ BackGroundColor #FFFFFF FontSize 14 ArrowColor #FF8000 BorderColor #FF8000 FontColor black FontName Arial }

skinparam class{ BackGroundColor #FFFFFF FontSize 14 ArrowColor #FF8000 BorderColor #FF8000 FontColor black FontName Technical } This calls for the WikiSon notation

Link as WikiSon
Using the WikiSon Concept approach the Link Concept is represented via the Wiki Category:Link Especially there is a List of Links page available.

Importance
this is a fundamental concept should not be broken. Therefore

Examples
internal default link to Main Page

internal link to Main Page

internal link to Main Page with title

external link

external link with title

Prerquisite
LocalSettings.php needs to have the StringFunctions enabled:

Template source
The complexity of this template macro needs to be hidden

pretty printed Template macro
this version would unfortunately create unwanted newlines in the macro result

How the Link Macro works
The Link Macro checks whether the link is external or internal and displays the correct version. It sets the Link Concept's attributes by setting the correspond Semantic Media Wiki properties. it uses the following helper funcitons:


 * Substring: https://www.mediawiki.org/wiki/Extension:StringFunctions/en#.23sub:
 * #ifeq: https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions/en#.23ifeq
 * #if: https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions/en#.23if
 * #set: https://semantic-mediawiki.org/wiki/Help:Setting_values

Substring
The start parameter, if positive (or zero), specifies a zero-based index of the first character to be returned.

Example: returns cream.

returns Ice.

generated version of this template
Dies ist die Vorlage „Link“. Sie sollte im folgenden Format genutzt werden:

 Klick auf „Bearbeiten“, um den Quelltext der Vorlage anzusehen.  {| class="wikitable" ! target ! title ...
 * Link_target::
 * Link_title::
 * }

