Template:Infobox Smasher: Difference between revisions

support multiple alias parameters for structured data
(prevent duplicate alternateName if realname=name or realname=PAGENAME)
(support multiple alias parameters for structured data)
Line 1: Line 1:
<noinclude>{{Infobox Smasher/doc}}</noinclude><includeonly><div role="complementary" aria-label="Infobox" class="infobox" style="box-sizing:border-box;width: 21em;font-size:90%;text-align:center" {{#ifeq:{{NAMESPACE}}|Smasher|itemscope itemtype="http://schema.org/Person"}}>
<noinclude>{{Infobox Smasher/doc}}</noinclude><includeonly><div role="complementary" aria-label="Infobox" class="infobox" style="box-sizing:border-box;width: 21em;font-size:90%;text-align:center" {{#ifeq:{{NAMESPACE}}|Smasher|itemscope itemtype="http://schema.org/Person"}}>
<div style="margin:.3em; background-color: #eee; font-size:130%; font-weight:bold"><span {{#ifeq:{{{name|{{PAGENAME}}}}}|{{{realname}}}||itemprop="{{#if:{{{realname|}}}|alternateName|name}}"}}>{{{name|{{PAGENAME}}}}}</span>{{#if:{{{alias|}}}|&nbsp;"<i itemprop="alternateName">{{{alias}}}</i>"}}</div>
    <div style="margin:.3em; background-color: #eee; font-size:130%; font-weight:bold"><!--
    --><span {{#ifeq:{{{name|{{PAGENAME}}}}}|{{{realname}}}||itemprop="{{#if:{{{realname|}}}|alternateName|name}}"}}><!--
        -->{{{name|{{PAGENAME}}}}}<!--
    --></span><!--
    -->{{#forargs:alias||a|
            &#32;"<i itemprop="alternateName">{{#var:a}}</i>"
        }}
    </div>
{{#if:{{{image|}}}|
{{#if:{{{image|}}}|
<div {{#ifeq:{{NAMESPACE}}|Smasher|itemprop="image" itemscope itemtype="http://schema.org/ImageObject"}}>
<div {{#ifeq:{{NAMESPACE}}|Smasher|itemprop="image" itemscope itemtype="http://schema.org/ImageObject"}}>
703

edits