Advertisement
Strider64

blog_cms_template.tpl

Oct 12th, 2017
1,183
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {extends file="blog_template.tpl"}
  2. {block name=blog_cms}
  3.     {* Create a CMS Display using Smarty *}
  4.     {foreach $content as $thread}
  5.         {* Show only left column posts *}
  6.         {if $thread.column_pos === $column}
  7.             <article class="cms">
  8.                 <h2>{$thread.heading|escape}</h2>
  9.                 <h3 class="subheading">Created on {$thread.date_added} by {$thread.author|escape}</h3>
  10.                 <figure class="imageStyle">
  11.                     <img src="{$thread.image_path}" alt="{$thread.heading|escape}">
  12.                     <figcaption>&nbsp;</figcaption>
  13.                 </figure>
  14.                 <p>{$thread.content|escape}</p>
  15.  
  16.                 {if $login_status && ($online_id === $thread.user_id)}
  17.                     <div class="system">
  18.                         <a class="edit" href="edit/{$thread.id}">Edit</a>                
  19.                         <a class="delete" href="delete_page.php?id={$thread.id}" onclick="return confirm(\'Are you sure you want to delete?\')">Delete</a>
  20.                     </div>
  21.                 {/if}
  22.  
  23.                 <br>
  24.             </article>
  25.         {/if}
  26.     {/foreach}
  27. {/block}
Advertisement
RAW Paste Data Copied
Advertisement