Diferencia entre revisiones de «Plantilla:URL»

De Familia Sanchez Arjona
Saltar a: navegación, buscar
m (simplify tests for presence of parameter 2, and of the titleparts limitation and its work-round ; additional fix for "ftp://" URLs)
m (another pathological case solved)
Línea 2: Línea 2:
 
   --><span class="url"><!--
 
   --><span class="url"><!--
 
   -->{{#ifeq:{{#titleparts:{{{1|}}}|1|1}}|{{{1|}}}|<!-- work-around when titleparts doesn't accept the URL and returns the full string instead: don't attempt to transform the displayed URL
 
   -->{{#ifeq:{{#titleparts:{{{1|}}}|1|1}}|{{{1|}}}|<!-- work-around when titleparts doesn't accept the URL and returns the full string instead: don't attempt to transform the displayed URL
       -->[{{#if:1|{{{1|}}}}}]<!-- This #if:1 allows trimming leading spaces in the full URL: {{{1|}}}
+
       -->[{{#if:1|{{{1|}}}}} {{#if:{{{2|}}}|{{#if:1|{{{2|}}}}}|{{#if:1|{{{1|}}}}}}}]<!-- These "#if:1" pseudo-tests (always true) allow trimming leading spaces in their text parameter
 
   -->|<!--
 
   -->|<!--
 
       -->{{#switch:{{lc:{{#titleparts:{{{1|}}}|2}}}}<!--
 
       -->{{#switch:{{lc:{{#titleparts:{{{1|}}}|2}}}}<!--
Línea 36: Línea 36:
 
         -->]<!--
 
         -->]<!--
 
       -->}}<!--
 
       -->}}<!--
 +
  -->}}<!--
 
   --></span><!--
 
   --></span><!--
 
-->|{{tlx|URL|example.com}}<!--
 
-->|{{tlx|URL|example.com}}<!--
 
-->}}</includeonly><noinclude>{{documentation}}</noinclude>
 
-->}}</includeonly><noinclude>{{documentation}}</noinclude>

Revisión del 03:01 11 oct 2010

50px Template documentation[create]