Menu issue

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
gottelicious
New Member
New Member
Posts: 7
Joined: Mon Jul 11, 2011 1:36 pm

Menu issue

Post by gottelicious »

Hi I have a page with two main pages, and several subpages for each of them, and i want the menu to show the subpages for the current page. I know to use the childrenof="$lang_parent" but as soon as i add the line to my template, all design on the website disappears and i get the error message - Fatal error: Using $this when not in object context in /srv/www/norcornex_test.celt.dk/public_html/lib/classes/class.contentoperations.inc.php on line 218 - I tried doing the site in the standard NCleanBlue and there was no problem so I guess it's a problem with the template i use so here it is:

{MleCMS action="init"}{process_pagedata}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da" >
<head>
<title>{title} - {sitename}</title>
{metadata}
{stylesheet}
</head>

</__body>
<div id='container'>
<div id='header'>
<div id='header-container'>
<h1><a href='{root_url}'>Norcornex<span></span></a></h1>
<h2><a href='{root_url}'>En stærk stålpartner<span></span></a></h2>
<div id='topmenu'>
{menu template='norcornex' number_of_levels='1' childrenof=$lang_parent}
</div>
</div>
</div>
<div id='content'>
<div id='content-container'>
<div id='wrap'>
{if $page_alias neq "kontakt"}
<div id='top'>
{content}
</div>
{/if}
<div id='left'>
{content block="nederst til venstre"}
</div>
<div id='center'>
{content block="nederst i midten"}
</div>
</div>
<div id='right'>
{include_content page_alias='hojrespalte'}
{content block="nederst til højre"}
</div>
</div>
</div>
<div id='footer'>
<div id='footer-container'>
{global_content name='footer'}
</div>
</div>
</div>
<__script__ type='text/javascript' src='uploads/javascript/spamspan.js'></__script>
<__body>
</__html>

Can someone tell me if and how i can get my own template to work? Thanks a lot

Anders Gotfredsen
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu issue

Post by Dr.CSS »

Are you sure $lang_parent is one of menu managers parameter?...
Post Reply

Return to “Layout and Design (CSS & HTML)”