Site Index > Site Configuration > Infobox Template |
This page contains templates for infoboxes that appear in the upper right hand corner of a page. The behavior of the greater than and less than functions is erratic when in a nested if statement so there are some includes that may appear unnessarsary to compensate for that.
Default Infobox
This is the standard infobox that appears on any page where the variable infobox is set to "yes".
[[#infoboxstart]] (:if equal "{$isMobile}" "true":) (:table class=infoboxmobile width=325px background:#000000; border=1 align=center cellpadding=5px:) (:else:) (:table class="infobox infoboxhead" width=250px float=right background:#000000; border=1 align=right cellpadding=5px:) (:ifend:) (:cellnr align=center colspan=2:)[[{$FullName}|{$Title}]] (:if ! equal {$:image1} "":) (:cellnr colspan=2 align=center class=infoboxrow:) %width=75px% {$UploadUrl}/Main/{$:image{(rand 1 {$:imageqty})}} (:ifend:) (:if ! equal "{$:caption}" "":) (:cellnr colspan=2 align=center class=infoboxrow:) {$:caption} (:ifend:) (:if ! equal "{$:updated}" "":) (:headnr class=infoboxrow width=50px:) Last Updated: (:cell class=infoboxrow align=center:) {$:updated} (:ifend:) (:if ! equal "{$:created}" "":) (:headnr class=infoboxrow width=50px:) Created: (:cell class=infoboxrow align=center:) {$:created} (:ifend:) (:if ! equal "{$:retired}" "":) (:headnr class=infoboxrow width=50px:) [[main.HomePage-Log#retired|Retired]]: (:cell class=infoboxrow align=center:) {$:retired} (:ifend:) (:if ! equal "{$:obsolete}" "":) (:headnr class=infoboxrow width=50px:) [[main.HomePage-Log|Obsolete]]: (:cell class=infoboxrow align=center:) {$:obsolete} (:ifend:) [[#classstart]] (:if le {(add 1 {$$count})} {$:classqty}:) (:cellnr colspan=2 align=center class="infoboximage infoboxrow":) %height=75px width=75px% {$UploadUrl}/Site/{$:class{(add 1 {$$count})}}.png {site.classes$:{$:class{(add 1 {$$count})}}title} (:include site.infobox#subclassstart#subclassend basepage={$FullName} self=1 subcount="{(add 1 {$$count})}":) (:include site.infobox#shortstart#shortend basepage={$Fullname} self=1 shortcount={(add 1 {$$count})}:) (:include site.infobox#classstart#classend basepage={$FullName} self=1 count='{(add {$$count} 1)}':) (:ifend:) [[#classend]] (:tableend:) [[#infoboxend]]
Short Check
If short (with a number for class) is set to "yes" will only give the name associated with the class, nothing more. Otherwise this calls the standard infobox information and gives each part of the class data array.
[[#shortstart]] (:if equal "{$:short{$$shortcount}}" "yes":) (:include site.infobox#rowstart#rowend nameplate="{site.classes$:{$:class{$$shortcount}}name1}" trait="{$:{site.classes$:{$:class{$$shortcount}}value1}}":) (:else:) (:include site.infobox#multirowstart#multirowend basepage={$FullName} self=1 classname="{$:class{$$shortcount}}" rowcount=0 max={site.classes$:{$:class{$$shortcount}}qty} entrynum={$:classrepeat{$$shortcount}}:) (:ifend:) [[#shortend]]
Sub Class Image
This adds an image if there is a subclass listed.
[[#subclassstart]] (:if attachments {$:subclass{$$subcount}}.png site.site:) %width=75px% {$UploadUrl}/Site/{$:subclass{$$subcount}}.png {site.classes$:{$:subclass{$$subcount}}title} (:ifend:) [[#subclassend]]
Multi Row Template
[[#multirowstart]] (:if le {(add 1 {$$rowcount})} {$$max}:) (:include site.infobox#rowstart#rowend nameplate="{site.classes$:{$$classname}name{(add 1 {$$rowcount})}}" trait="{$:{site.classes$:{$$classname}value{(add 1 {$$rowcount})}}{$$entrynum}}":) (:include site.infobox#multirowstart#multirowend basepage={$FullName} self=1 rowcount={(add 1 {$$rowcount})} max={$$max} classname={$$classname} entrynum={$$entrynum}:) (:ifend:) [[#multirowend]]
Row Template
This creates rows in the infobox.
[[#rowstart]] (:if ! equal "{$$trait}" "":) (:headnr class=infoboxrow width=50px:) {$$nameplate}: (:cell class=infoboxrow align=center:) {$$trait} (:ifend:) [[#rowend]]
Categories: Templates
Site Index | About Us | Event Calendar | Novitas Linktree | Contact Us |
|
Page last modified on June 14, 2023, at 02:10 PM
Powered by
PmWiki