Improved tagcloud template / template code optimizations
authorMarcel Werk <burntime@woltlab.com>
Mon, 14 Jul 2014 17:12:40 +0000 (19:12 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 14 Jul 2014 17:12:40 +0000 (19:12 +0200)
com.woltlab.wcf/templates/tagCloudBox.tpl
com.woltlab.wcf/templates/tagged.tpl

index ded4835c779279514585bfdbe462f78588b3bd0f..c5f928dcc6de6ed14d9d380cae9ad8d3482335d0 100644 (file)
@@ -1,8 +1,8 @@
 {hascontent}
        <ul class="tagList">
                {content}
-                       {foreach from=$tags item=tag}
-                               <li><a href="{link controller='Tagged' object=$tag}{/link}" rel="tag" style="font-size: {@$tag->getSize()}%;">{$tag->name}</a></li>
+                       {foreach from=$tags item=tagObj}
+                               <li><a href="{link controller='Tagged' object=$tagObj}{if !$taggableObjectType|empty}objectType={@$taggableObjectType}{/if}{/link}" rel="tag" style="font-size: {@$tagObj->getSize()}%;">{$tagObj->name}</a></li>
                        {/foreach}
                {/content}
        </ul>
index 1c8a3cce8da890b0611f4d49467ddae4a49eba2a..3caa1aae7441f16b263100efff47835be8d73574 100644 (file)
        <fieldset>
                <legend>{lang}wcf.tagging.tags{/lang}</legend>
                
-               <ul class="tagList">
-                       {foreach from=$tags item=__tag}
-                               <li><a href="{link controller='Tagged' object=$__tag}objectType={@$objectType}{/link}" rel="tag" style="font-size: {@$__tag->getSize()}%;">{$__tag->name}</a></li>
-                       {/foreach}
-               </ul>
+               {include file='tagCloudBox' taggableObjectType=$objectType}
        </fieldset>
 {/capture}