Perform large-scale removal of unneeded `@` symbols in templates
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 25 Jan 2023 09:11:04 +0000 (10:11 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 25 Jan 2023 09:11:04 +0000 (10:11 +0100)
docs/javascript/general-usage.md
docs/migration/wsc53/javascript.md
docs/tutorial/series/part_2.md
docs/view/template-plugins.md
docs/view/templates.md

index 8b2b520073de7d2b5124fb89a0a91334ce6f6d01..5909c261722e7293a4f379c8585f83eb07583820 100644 (file)
@@ -65,7 +65,7 @@ and thus avoid outdated caches by relying on a unique value, without invalidatin
 the cache more often that it needs to be.
 
 ```html
-<script data-relocate="true" src="{@$__wcf->getPath('app')}js/App.js?t={@LAST_UPDATE_TIME}"></script>
+<script data-relocate="true" src="{$__wcf->getPath('app')}js/App.js?t={@LAST_UPDATE_TIME}"></script>
 ```
 
 For small scripts you can simply serve the full, non-minified version to the user
@@ -80,7 +80,7 @@ the minified and optimized file to the average visitor. You should use the
 `ENABLE_DEBUG_MODE` constant to decide which version should be loaded.
 
 ```html
-<script data-relocate="true" src="{@$__wcf->getPath('app')}js/App{if !ENABLE_DEBUG_MODE}.min{/if}.js?t={@LAST_UPDATE_TIME}"></script>
+<script data-relocate="true" src="{$__wcf->getPath('app')}js/App{if !ENABLE_DEBUG_MODE}.min{/if}.js?t={@LAST_UPDATE_TIME}"></script>
 ```
 
 ### The Accelerated Guest View ("Tiny Builds")
@@ -93,7 +93,7 @@ for visitors. If you are providing a separate compiled build for this mode, you'
 need to include yet another switch to serve the right version to the visitor.
 
 ```html
-<script data-relocate="true" src="{@$__wcf->getPath('app')}js/App{if !ENABLE_DEBUG_MODE}{if VISITOR_USE_TINY_BUILD}.tiny{/if}.min{/if}.js?t={@LAST_UPDATE_TIME}"></script>
+<script data-relocate="true" src="{$__wcf->getPath('app')}js/App{if !ENABLE_DEBUG_MODE}{if VISITOR_USE_TINY_BUILD}.tiny{/if}.min{/if}.js?t={@LAST_UPDATE_TIME}"></script>
 ```
 
 ### The `{js}` Template Plugin
index cd9f4c02b0c241ef4dc0fd501d3cf292e88d6c96..4bce6df6433400d0a71b1a5c93a00ed098e12722 100644 (file)
@@ -88,7 +88,7 @@ Example:
     
     <tbody>
         {foreach from=$objects item=foo}
-            <tr class="jsObjectActionObject" data-object-id="{@$foo->getObjectID()}">
+            <tr class="jsObjectActionObject" data-object-id="{$foo->getObjectID()}">
                 <td class="columnIcon">
                     {objectAction action="toggle" isDisabled=$foo->isDisabled}
                     {objectAction action="delete" objectTitle=$foo->getTitle()}
index 047b8c61d14c3bdf3165b8092da784401ce9b9a5..1cc95497b1c86208f83826e9f49430eb4086405e 100644 (file)
@@ -138,7 +138,7 @@ As the relevant template codes are only one line each, we will simply put them d
 The code for the table head is similar to the other `th` elements:
 
 ```smarty
-<th class="columnDate columnBirthday{if $sortField == 'birthday'} active {@$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=birthday&sortOrder={if $sortField == 'birthday' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.birthday{/lang}</a></th>
+<th class="columnDate columnBirthday{if $sortField == 'birthday'} active {$sortOrder}{/if}"><a href="{link controller='PersonList'}pageNo={@$pageNo}&sortField=birthday&sortOrder={if $sortField == 'birthday' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.person.birthday{/lang}</a></th>
 ```
 
 For the table body’s column, we need to make sure that the birthday is only show if it is actually set:
index df4a0ac91efd9acfa76925c448f026a8056a0100..c7879b3a1e46d83ad4a1bda913965098e80abc00 100644 (file)
@@ -32,7 +32,7 @@ This functionality makes it easy to generate links with popover support.
 Instead of
 
 ```smarty
-<a href="{$entry->getLink()}" class="blogEntryLink" data-object-id="{@$entry->entryID}">{$entry->subject}</a>
+<a href="{$entry->getLink()}" class="blogEntryLink" data-object-id="{$entry->entryID}">{$entry->subject}</a>
 ```
 
 using
index 8fc29e58c9735ab9f0b539b8a331ecad2fa32440..a4e8939502a96e32d37181959c6805b95001047e 100644 (file)
@@ -126,8 +126,8 @@ More information about installing templates can be found on those pages.
 <div class="section tabMenuContainer">
        <nav class="tabMenu">
                <ul>
-                       <li><a href="{@$__wcf->getAnchor('tab1')}">Tab 1</a></li>
-                       <li><a href="{@$__wcf->getAnchor('tab2')}">Tab 2</a></li>
+                       <li><a href="{$__wcf->getAnchor('tab1')}">Tab 1</a></li>
+                       <li><a href="{$__wcf->getAnchor('tab2')}">Tab 2</a></li>
                        
                        {event name='tabMenuTabs'}
                </ul>
@@ -142,8 +142,8 @@ More information about installing templates can be found on those pages.
        <div id="tab2" class="tabMenuContainer tabMenuContent">
                <nav class="menu">
                        <ul>
-                               <li><a href="{@$__wcf->getAnchor('tab2A')}">Tab 2A</a></li>
-                               <li><a href="{@$__wcf->getAnchor('tab2B')}">Tab 2B</a></li>
+                               <li><a href="{$__wcf->getAnchor('tab2A')}">Tab 2A</a></li>
+                               <li><a href="{$__wcf->getAnchor('tab2B')}">Tab 2B</a></li>
                                
                                {event name='tabMenuTab2Subtabs'}
                        </ul>