28/11/2012, 06:38:13
Bonsoir,
Merci, mais ce n'est pas le problème. Comme je l'avais mentionné, mon code fonctionnait dans mon autre gabarit.
Je viens de faire des tests, et l'erreur ne se produit pas si je mets ce bout de code dans la partie "header". Nul part ailleurs (après content, dans footer) ne fonctionne - toujours la même erreur.
Je mets mon gabarit, si jamais qqn peut m'aider à y comprendre.
Merci encore.
Merci, mais ce n'est pas le problème. Comme je l'avais mentionné, mon code fonctionnait dans mon autre gabarit.
Je viens de faire des tests, et l'erreur ne se produit pas si je mets ce bout de code dans la partie "header". Nul part ailleurs (après content, dans footer) ne fonctionne - toujours la même erreur.
Je mets mon gabarit, si jamais qqn peut m'aider à y comprendre.
Merci encore.
Code :
[== Indéfini ==]
{capture name="menu" assign="testvar"}{menu template='cssmenu' collapse='1' start_level='3' excludeprefix='intranet_'}{/capture}
{if isset($testvar) && $testvar != ''}
<nav class='sidebar'>
{$testvar}
</nav>
{/if}
Code :
[== HTML ==]
{strip}
{MleCMS action="init"}{process_pagedata}
{* With cms_lang_info we retrieve current language information, assign gives us $nls variable we can work with *}
{cms_lang_info assign='nls'}
{* using strip as we don't want useless whitespace, especially not before doctype *}
{/strip}<!doctype html>
<html lang="{$lang_parent}">
<head>
<meta charset='{$nls->encoding()}'>
<title>{title} - {sitename}</title>
<meta name='viewport' content='initial-scale=1.0 maximum-scale=1.0 user-scalable=no' />
<meta name='HandheldFriendly' content='true' />
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}
{metadata}
{* See in news detail template how cannonical url can be assigned from module *}
{if isset($canonical)}<link rel='canonical' href='{$canonical}' />{elseif isset($content_obj)}<link rel='canonical' href='{$content_obj->GetURL()}' />{/if}
{* This is how all the stylesheets attached to this template are linked to *}
{cms_stylesheet}
{* using google fonts *}
<link href='//fonts.googleapis.com/css?family=Oswald:400,700' rel='stylesheet' type='text/css'>
{* learning IE lower then Version 9 some html5 *}
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
{* Relational links for interconnections between pages, good for accessibility and Search Engine Optmization *}
{cms_selflink dir='start' rellink='1'}
{cms_selflink dir='prev' rellink='1'}
{cms_selflink dir='next' rellink='1'}
</head>
<body id='boxed'>
<!-- #wrapper (wrapping content in a box) -->
<div class='container centered' id='wrapper'>
<!-- accessibility links, jump to nav or content -->
<ul class="visuallyhidden">
<li>{anchor anchor='nav' title='Skip to navigation' accesskey='n' text='Skip to navigation'}</li>
<li>{anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}</li>
</ul>
<!-- accessibility //-->
<!-- .top (top section of page containing logo, navigation search...) -->
<header class='top'>
<div class='row header'>
{strip}
{search assign='is_search'}{* assigned search module tag, now we can build different search template for this site template and have fun with html5, Read http://www.w3.org/TR/html-markup/input.search.html for full attirbute specs *}
{if isset($is_search)}
<div class='grid_2 suffix_2 search noprint' role='search'>
{$startform}
<label for='{$search_actionid}searchinput' class='visuallyhidden'>{$searchprompt}:</label>
<input type='search' class='search-input' id='{$search_actionid}searchinput' name='{$search_actionid}searchinput' size='20' maxlength='50' value='' placeholder='{$searchtext}' />
{if isset($hidden)}{$hidden}{/if}
{$endform}
</div>
{/if}{/strip}
<!-- .main-navigation (main navigation on the right side) -->
<nav class='main-navigation grid_8 noprint' id='nav' role='navigation'>
{menu template='Simplex_Navigation.tpl' show_root_siblings="1" excludeprefix="intranet_" childrenof=$lang_parent}
</nav>
<!-- .main-navigation //-->
</div>
<div class='clear'></div>
<!-- .header-bottom //-->
<!-- .banner (banner area for a slider or teaser image) -->
<section class='banner row noprint' role='banner'>
<div class='banner-text'>
<div class='logo'>{cms_selflink dir="start" text="$sitename" page=$lang_parent}{MleCMS name="snippet_sitename"}{MleCMS action='langs' template="Separator"}</div>
</div>
<div class='banner-image cf'>
{strip}
{* you do not need a module for every simple site functionality. For example you can build a simple slideshow
with php glob function (http://www.php.net/manual/en/function.glob.php) without wasting your system resources
by using modules or plugins.
Below would search for files matching .jpg in folder named teaser in simplex theme folder *}
{assign var='teaser' value='uploads/simplex/teaser/*.jpg'|glob}
{foreach from=$teaser item='one'}
<div><div class='sitename'>{MleCMS name="snippet_sitename"}</div> <img src='{root_url}/{$one}' width='852' height='150' alt='' /> </div>
{/foreach}
{/strip}
</div>
</section>
</header>
<!-- .top //-->
<!-- .content-wrapper (wrapping div for content area) -->
<div class='content-wrapper cf'>
<!-- .content (display content first) -->
<div class='content-inner'>
<!-- .content-top (breadcrumbs and print button) -->
<div class='content-top cf' itemscope itemtype='http://data-vocabulary.org/Breadcrumb'>
{* menu manager has action breadcrumbs since 1.11, you can use {cms_breadcrumbs} tag or {menu action='breadcrumbs'} as below *}
<div class='grid_5'>{menu action='breadcrumbs'}</div>
{* print tag from CMSPrinting Module *}
<div id='sharing' class='grid_5'>
{translate text="Partager"}: {socialBookmarking submitto="email|facebook|twitter|linkedin" plusone="1" img_size="small" url="1"}
{translate text="Traduire"}: {socialBookmarking submitto="googletranslate" img_size="small" url="1"}
</div>
<div class="grid_2">{print showbutton='false' class='printbutton noprint'}</div>
</div>
<!-- .content-top //-->
<!-- .content (actual content with title and content tags) -->
<article class='content' id='main' role='main'>
<h1 class='grid_10 push_1'>{title}</h1> {* title tag *}
{content_image block='logo' dir='images/icone' class='grid_1 pull_10'}
{* logo de chaque page *}
<div class='clear'></div>
{content}
</article>
<!-- .content //-->
</div>
<!-- .content-inner //-->
<div class='cf grid_8 prefix_4'>
<span class='previous'>{cms_selflink dir='previous'}</span>
<span class='next'>{cms_selflink dir='next'}</span>
</div>
</div>
<!-- .content-wrapper //-->
<!-- .footer (footer area) -->
<footer class='row footer'>
<span class='back-top'>{anchor anchor='main' text='↑'}</span>
<section class='grid_4 copyright'>
<ul class='social cf'>
<li class='twitter'><a title='Twitter' href='http://twitter.com/#!/cmsms'>Twitter</a></li>
<li class='linkedin'><a title='LinkedIn' href='http://www.linkedin.com/groups?gid=1139537'>LinkedIn</a></li>
<li class='rss'> {CGFeedMaker action='rsslink' feed='{translate text="annonces"}' image='uploads/images/cms/rss.png' imageonly='1'}</li>
</ul>
{MleCMS name='block_pied'}
</section>
<section class='grid_8 noprint'>
<nav class='footer-navigation row'>
{MleCMS name='block_menu_pied'}
</nav>
</section>
</footer>
<div class='clear'></div>
</div>
<!-- #wrapper //-->
{cms_jquery cdn=true exclude='jquery-ui.min.js,jquery.ui.nestedSortable.js,jquery.json.min.js' append='uploads/simplex/js/functions.min.js'}
{global_content name='accordion'}
{global_content name='analytics'}
</body>
</html>