-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathcms.tpl
55 lines (54 loc) · 2.14 KB
/
cms.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{*
* =|= CMS ======================================================
*
* Displays CMS content and categories.
* ==============================================================
*}
{if isset($cms) && ($content_only == 0)}
{include file="$tpl_dir./breadcrumb.tpl"}
{/if}
{if isset($cms) && !isset($category)}
{if !$cms->active}
<br />
<div id="admin-action-cms">
<p>{l s='This CMS page is not visible to your customers.'}
<input type="hidden" id="admin-action-cms-id" value="{$cms->id}" />
<input type="submit" value="{l s='Publish'}" class="exclusive" onclick="submitPublishCMS('{$base_dir}{$smarty.get.ad|escape:'htmlall':'UTF-8'}', 0, '{$smarty.get.adtoken|escape:'htmlall':'UTF-8'}')"/>
<input type="submit" value="{l s='Back'}" class="exclusive" onclick="submitPublishCMS('{$base_dir}{$smarty.get.ad|escape:'htmlall':'UTF-8'}', 1, '{$smarty.get.adtoken|escape:'htmlall':'UTF-8'}')"/>
</p>
<div class="clear" ></div>
<p id="admin-action-result"></p>
</p>
</div>
{/if}
<div class="rte{if $content_only} content_only{/if}">
{$cms->content}
</div>
{elseif isset($category)}
<div class="block-cms">
<h1><a href="{if $category->id eq 1}{$base_dir}{else}{$link->getCategoryLink($category->id, $category->link_rewrite)}{/if}">{$category->name|escape:'htmlall':'UTF-8'}</a></h1>
{if isset($sub_category) & !empty($sub_category)}
<h4>{l s='List of sub categories in %s:' sprintf=$category->name}</h4>
<ul class="bullet">
{foreach from=$sub_category item=subcategory}
<li>
<a href="{$link->getCMSCategoryLink($subcategory.id_cms_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a>
</li>
{/foreach}
</ul>
{/if}
{if isset($cms_pages) & !empty($cms_pages)}
<h4>{l s='List of pages in %s:' sprintf=$category->name}</h4>
<ul class="bullet">
{foreach from=$cms_pages item=cmspages}
<li>
<a href="{$link->getCMSLink($cmspages.id_cms, $cmspages.link_rewrite)|escape:'htmlall':'UTF-8'}">{$cmspages.meta_title|escape:'htmlall':'UTF-8'}</a>
</li>
{/foreach}
</ul>
{/if}
</div>
{else}
{l s='This page does not exist.'}
{/if}
<br />