title: $:/snippets/LayoutSwitcher
tags: $:/tags/ControlPanel/Appearance
caption: {{$:/language/ControlPanel/LayoutSwitcher/Caption}}
\whitespace trim
\function layout.filter() [all[current]field:title[$:/core/ui/PageTemplate]]
\function layout.empty.filter() [all[current]field:title{$:/layout}]
<$linkcatcher to="$:/layout">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Layout]] [[$:/core/ui/PageTemplate]] +[!is[draft]sort[name]]">
<$list filter="[{$:/layout}!has[text]]" variable="ignore">
<$list-empty>
<$link to={{!!title}} role="option" aria-selected={{{ [layout.empty.filter[]then[true]else[false]] }}}>
''<$transclude tiddler={{{ [get[icon]] }}}/><$transclude field="name"/>'' - <$transclude field="description"/>
$link>
$list-empty>
<$link to={{!!title}} role="option" aria-selected={{{ [layout.filter[]then[true]else[false]] }}}>
''<$transclude tiddler={{{ [get[icon]] }}}/><$transclude field="name"/>'' - <$transclude field="description"/>
$link>
$list>
$list>
$linkcatcher>