Page 1 of 1
[solved] Problems with submenu on WCS Template
Posted: Tue Apr 14, 2009 8:46 am
by Pallosalama
Link to the theme:
http://themes.cmsmadesimple.org/index.php?mact=Uploads,cntnt01,default,0&cntnt01category=Full%20Themes&cntnt01sortorder=date_desc&cntnt01mode=single&cntnt01count=5&cntnt01detailpage=theme-detail&cntnt01template=summary&cntnt01detailtemplate=themes-detail&cntnt01pagenum=2&cntnt01returnid=63&cntnt01upload_id=157&cntnt01returnid=63
I requested help on the comments section of the theme in question and the problem can be found there but haven't got help (the latest post is send by me). There's many solutions to get it work there but none have helped me and some other persons have had the same problem.
If somebody can find what's wrong with it or have got it to work I would really appreciate the help.
kind regards
Jouni
Re: Problems with submenu on WCS Template
Posted: Tue Apr 14, 2009 9:42 am
by uniqu3
Hi,
you will need to do following:
Make another User Defined Tag named "submenu"
Code: Select all
global $gCms;
$pos = $gCms->variables['position'];
$base = explode('.', $pos);
$smarty->assign('h_toplevel', $base[0] * 1);
$smarty->assign('h_parent', $base[ (count($base) > 1) ? count($base)-2 : 0 ] * 1);
$smarty->assign('h_this', $base[count($base)-1] * 1);
Then go to MenuManager and create new template named wcs_template - submenu
Code: Select all
{* CSS classes used in this template:
.current - The current page in the vertical (local) menu.
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *}
{if $count > 0}
<ul id="menuvert" class="menu_vert">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if $node->current == true}
<li class="current"><a class="current" href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>
{elseif $node->type == 'sectionheader'}
<li><span class="bullet_sectionheader">{$node->menutext}</span>
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"><hr class="separator" />
{else}
<li><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-2}</li>
</ul>
{/if}
Thats all, i tried it on my local installation with PHP5, MySQL 5 and CMSMS 1.5.3 and it works.
Re: Problems with submenu on WCS Template
Posted: Tue Apr 14, 2009 8:55 pm
by Dr.CSS
Themes should not have GCB in them unless it is a zip file, and in zip file templates extensions like .mm make no sense as not everyone has a program to open them and CMSMS has no way to use them, they should be named so you know what they are for but in a .txt format so they can be opened and copy/pasted where they go...
Re: Problems with submenu on WCS Template
Posted: Wed Apr 15, 2009 7:46 am
by uniqu3
Well i wondered about GCB to

and the Theme was only .xml.
Re: Problems with submenu on WCS Template
Posted: Thu Apr 16, 2009 4:45 pm
by Pallosalama
uniqu3 wrote:
Hi,
you will need to do following:
...
...
I tried what uniqu3 said in the second post but didnt help. It's weird that it works for some but not for everyone.
As Bastian asked in comments section: If there is a submenu, where will i see it on the page, at whitch table ? (center, header) or will it be a dropdown ?
Can't figure this out.
regards
Jouni
edit: and now I have also tried this on real server instead of using it only on my local PC but still the same problem
EDIT2: I don't what did I do but the submenus started working and they show up on left side frame where the news is located!!!
Re: Problems with submenu on WCS Template
Posted: Fri Apr 17, 2009 3:11 am
by Dr.CSS
Good chance it may not have shown unless you have children to the top level menu as this is the way a lot of them work...
If you got it to work please make first post [solved]...
Re: [solved] Problems with submenu on WCS Template
Posted: Wed Apr 22, 2009 5:44 am
by jubert123
Where can i found WCS Template with have validation?
_________________
Indianapolis Web Design