[solved] Problems with submenu on WCS Template

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
Pallosalama
New Member
New Member
Posts: 2
Joined: Wed Apr 08, 2009 11:41 am

[solved] Problems with submenu on WCS Template

Post 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
Last edited by Pallosalama on Fri Apr 17, 2009 10:10 am, edited 1 time in total.
uniqu3

Re: Problems with submenu on WCS Template

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Problems with submenu on WCS Template

Post 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...
uniqu3

Re: Problems with submenu on WCS Template

Post by uniqu3 »

Well i wondered about GCB to :-) and the Theme was only .xml.
Pallosalama
New Member
New Member
Posts: 2
Joined: Wed Apr 08, 2009 11:41 am

Re: Problems with submenu on WCS Template

Post 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!!!
Last edited by Pallosalama on Thu Apr 16, 2009 6:24 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Problems with submenu on WCS Template

Post 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]...
jubert123

Re: [solved] Problems with submenu on WCS Template

Post by jubert123 »

                    Where can i found WCS Template with have validation?


_________________
Indianapolis Web Design
Post Reply

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