• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Upgraded from old version - template not working
PostPosted: Mon Oct 22, 2018 5:57 pm 
Offline
New Member
New Member

Joined: Mon Oct 22, 2018 5:52 pm
Posts: 7
Hi all, I just upgraded my very old website from version 1.1.1 of CMS Made Simple to version 2.2.8.

I did it step by step and now the admin site is working. Unfortunately, my website shows an empty page. There is a head, by the body is completely empty. I think my template is not working anymore. Can someone help me and tell my what is wrong with this template?

I would very much appreciate the help!

\$1:
<!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="nl" lang="nl">
{* Change lang="en" to the language of your site *}

<head>

<title>{sitename} - {title}</title>
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}

{metadata}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}

{stylesheet}
{* This is how all the stylesheets attached to this template are linked to *}

{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
{* Relational links for interconnections between pages, good for accessibility and Search Engine Optmization *}


{literal}
<__script__ type="text/JavaScript">
<!--
//pass min and max -measured against window width
function P7_MinMaxW(a,b){
   var nw="auto",w=document.documentElement.clientWidth;
   if(w>=b){nw=b+"px";}if(w<=a){nw=a+"px";}return nw;
}
//-->
</__script>
<!--[if lte IE 6]>
<style type="text/css">
#pagewrapper {width:expression(P7_MinMaxW(720,950));}
#container {height: 1%;}
</style>
<![endif]-->
{/literal}
{* The min and max page width for Internet Explorer is set here. For other browsers it's in the stylesheet "Layout: Top menu + 2 columns" *}


<!--[if IE]>
<__script__ type="text/javascript" src="modules/MenuManager/CSSMenu.js"></__script>
<![endif]-->
{* The above JavaScript is required for CSSMenu to work in IE *}

</head>

</__body>

 <__script__ language="JavaScript">
   x = parseInt(Math.random() * 4 + 1);
   document.write('<div id="pagewrapper" style="background: #F3FECA url(uploads/images/{menu_text}'+x+'.jpg) no-repeat; background-position: top right;">');
  </__script>

    {* start accessibility skip links *}
    <ul class="accessibility">
      <li>{anchor anchor='menu_vert' 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>
    {* end accessibility skip links *}


    <hr class="accessibility" />
    {* Horizontal ruler that is hidden for visual browsers by CSS *}


   {* Start Header, with logo image that links to the default start page. Logo image is changed in the stylesheet  "For template: Left menu + 1 column" *}
   <div id="header">
          <h1 class="sitename"><br/><br/><br/>{sitename}</h1>
          <h1 class="pagename">{title}</h1>
   <hr class="accessibility" />
   </div>
   {* End Header *}


      {* Start Navigation *}
      <div id="menu_vert">
         <h2 class="accessibility">Navigation</h2>
         {menu template='cssmenu.tpl'}
      <hr class="accessibility" />
      </div>
      {* End Navigation *}


   {* Start Search
   <div id="search">
          {search}
   </div>
    End Search *}

   {* Start Content (Navigation and Content columns) *}
   <div id="content">

      {* Start Content Area *}
      <div id="main">
         {* <div style="float: right;">{print showbutton=true script=true}</div> *}
         {* <h2>{title}</h2> *}
         {content} <br />

      <hr class="accessibility" />
      </div>
     {* End Content Area *}
   </div>
   {* End Content *}


   {* Start Footer. Edit the footer in the Global Content Block called "footer" *}
   <div id="footer">
      {global_content name='footer'}
   </div>   
   {* End Footer  *}


</div>{* end pagewrapper *}
<__body>
</__html>


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgraded from old version - template not working  Topic is solved
PostPosted: Tue Oct 23, 2018 1:53 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 817
Location: Victoria, BC
Just use process of elimination. Comment out the 3 or 4 Smarty tags in the body one at a time and see if it works. Newer versions of Smarty are more sensitive to case and template names, it's usually something like that.

That said, it's probably the {menu} call, I'm guessing the template no longer has the .tpl extension in the name, if it exists at all.

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgraded from old version - template not working
PostPosted: Tue Oct 23, 2018 10:00 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7699
Location: The Netherlands
{stylesheet} -> {cms_stylesheet}

_________________
$1

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgraded from old version - template not working
PostPosted: Tue Oct 23, 2018 2:41 pm 
Offline
New Member
New Member

Joined: Mon Oct 22, 2018 5:52 pm
Posts: 7
Yes, all answers are helping very much. I'm seeing something now! Now I think something is wrong in the menu template. Can you please look at this? I believe $depth is never getting bigger than 0.

\$1:
{* cssmenu *}
{* this template uses recursion, but not a smarty function. *}
{*
  variables:
  node: contains the current node.
  aclass: is used to build a string containing class names given to the a tag if one is used
  liclass: is used to build a string containing class names given to the li tag.
*}
{if !isset($depth)}{$depth=0}{/if}
{strip}

{if $depth == 0}
<div id="menuwrapper">
<ul id="primary-nav">
{else}
<ul class="unli">
{/if}

{$depth=$depth+1}
{foreach $nodes as $node}
  {* setup classes for the anchor and list item *}
  {$liclass=[]}
  {$aclass=[]}

  {* the first child gets a special class *}
  {if $node@first && $node@total > 1}{$liclass[]='first_child'}{/if}

  {* the last child gets a special class *}
  {if $node@last && $node@total > 1}{$liclass[]='last_child'}{/if}

  {if $node->current}
    {* this is the current page *}
    {$liclass[]='menuactive'}
    {$aclass[]='menuactive'}
  {/if}
  {if $node->has_children}
    {* this is a parent page *}
    {$liclass[]='menuparent'}
    {$aclass[]='menuparent'}
  {/if}
  {if $node->parent}
    {* this is a parent of the current page *}
    {$liclass[]='menuactive'}
    {$aclass[]='menuactive'}
  {/if}

  {* build the menu item from the node *}
  {if $node->type == 'sectionheader'}
    <li class='{implode(' ',$liclass)}'><a{if count($aclass) > 0} class="{implode(' ',$aclass)}"{/if}><span class="sectionheader">{$node->menutext}</span></a>
      {if isset($node->children)}
        {include file=$smarty.template nodes=$node->children}
      {/if}
    </li>
  {else if $node->type == 'separator'}
    <li style="list-style-type: none;"><hr class="menu_separator"/></li>
  {else}
    {* regular item *}
    <li class="{implode(' ',$liclass)}">
      <a{if count($aclass) > 0} class="{implode(' ',$aclass)}"{/if} href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}><span>{$node->menutext}</span></a>
      {if isset($node->children)}
        {include file=$smarty.template nodes=$node->children}
      {/if}
    </li>
  {/if}
{/foreach}
{$depth=$depth-1}
</ul>

{if $depth == 0}
<div class="clearb"></div>
</div>{* menuwrapper *}
{/if}
{/strip}


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgraded from old version - template not working
PostPosted: Wed Oct 24, 2018 2:53 pm 
Offline
New Member
New Member

Joined: Mon Oct 22, 2018 5:52 pm
Posts: 7
Ok, depth is not the problem. It is not getting into the {foreach $nodes as $node}. Why?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Upgraded from old version - template not working
PostPosted: Fri Oct 26, 2018 6:19 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 817
Location: Victoria, BC
Rather than spending time troubleshooting MenuManager, which has been deprecated, perhaps just switch to Navigator? Start with one of the default templates and roll your own if needed.

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting