• 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


Forum rules


Only administrators can post or move items here.



Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: [fixed] start_level does not work
PostPosted: Sat Jun 27, 2015 8:33 am 
Offline
Forum Members
Forum Members

Joined: Tue Oct 21, 2014 12:47 pm
Posts: 103
Location: Lorient (France)
Trying to convert this
{menu template="menu_H_3_evolution" start_level='1' number_of_levels="5" }

{menu template="menu_V_evolution" start_level='2' }

{menu template="menu_bas" start_level='3' number_of_levels="1" }

by

{Navigator template="menu_H_3_evolution_V2" start_level='1' number_of_levels="5" }

{Navigator template="menu_V_evolution_V2" start_level='2' }

{Navigator template="menu_bas_V2" start_level='3' number_of_levels="1" }

I noticed that the layout of the page stops just before the first menu. Without start_level=1 the first navigator menu works fine but the other menus are not initiate at level 2 and 3.
Perhaps did I make a mistake, so I consider the template : "Top simple navigation + left subnavigation + 1 column". On his page we can read :

"The {menu} tag

The {menu} tag is inserted twice in the page template. First where the main navigation is, which should only show the top level. It looks like this: {menu template='Simple Navigation' number_of_levels='1'}.

The sub navigation should only contain the second level and down, depending on what is selected on the first level. Also, the third level links should only display when its parent on the second level is clicked, otherwise they are hidden. That is, the second level is collapsed unless the current page has sub pages.

The tag for the sub navigation looks like this: {menu template='simple_navigation.tpl' start_level='2' collapse='1'}."


{menu} or {Navigator}?

In the template the two tag are {Navigator}:

{Navigator loadprops=0 template='Simple Navigation' number_of_levels='1'}

{Navigator loadprops=0 template='Simple Navigation' collapse='1'}

but no start_level parameter here.

Now modify the two tag by

{Navigator loadprops=0 template='Simple Navigation' number_of_levels='1' start_level='1'}

{Navigator loadprops=0 template='Simple Navigation' collapse='1' start_level='2'}

and look at the result. Not good at all.

After suppress start_level='1'. The page layout works but the second menu is missing.


Last edited by archeo on Mon Jul 06, 2015 6:07 pm, edited 2 times in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: start_level does not work
PostPosted: Sat Jun 27, 2015 6:54 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8166
Location: Fernie British Columbia, Canada
I took a brand new installation. changed all pages (except the home page) to use NCleanBlue design and NCleanBlue template.

The NCleanBlue design calls
\$1:
{Navigator loadprops=0 template='minimal_menu' start_level=2}


in the footer. and it works just fine.

\$1:
and look at the result. Not good at all


Does not tell me much. I need to be able to reproduce problems in able to fix them. so please tell me exactly how I can reliably reproduce the issue.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: start_level does not work
PostPosted: Sat Jun 27, 2015 11:17 pm 
Offline
Forum Members
Forum Members

Joined: Tue Oct 21, 2014 12:47 pm
Posts: 103
Location: Lorient (France)
I test with "Top simple navigation + left subnavigation + 1 column" template. It is the value "start_level=1" that causes the crash. I test again tomorrow morning on a new installation, I must go to bed now.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: start_level does not work
PostPosted: Sun Jun 28, 2015 9:26 am 
Offline
Forum Members
Forum Members

Joined: Tue Oct 21, 2014 12:47 pm
Posts: 103
Location: Lorient (France)
First, to understand my problem look at this two snapshots of Top simple navigation + left subnavigation + 1 column page:
cms V1
there is a menu on the left. It is open on level 2
http://ciavatti.free.fr/cmsv2/cms-v1.JPG
cms-v2
there is no menu on the left
http://ciavatti.free.fr/cmsv2/cms-v2.JPG
have you the same page?

If yes look at cms-v2 template code

\$1:
[...]
{* stylesheet  "Navigation Simple - Horizontal" *}
        <h2 class="accessibility">Navigation</h2>
        {Navigator loadprops=0 template='Simple Navigation' number_of_levels='1'}
        <hr class="accessibility" />
[...]
{* Start Sub Navigation, stylesheet  "Navigation Simple - Vertical" *}
            <div id="menu_vert">
              <h2 class="accessibility">Sub Navigation</h2>
              {Navigator loadprops=0 template='Simple Navigation' start_level='2' collapse='1'}
                <hr class="accessibility" />
            </div>
[...]

now replace :
\$1:
{Navigator loadprops=0 template='Simple Navigation' number_of_levels='1'}

by
\$1:
{Navigator loadprops=0 template='Simple Navigation' number_of_levels='1' start_level='1'}

look at the page
http://ciavatti.free.fr/cmsv2/cms-v22.JPG


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: start_level does not work
PostPosted: Sun Jun 28, 2015 4:35 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8166
Location: Fernie British Columbia, Canada
Okay. thanks.

I think it's fixed now. should be available in the next snapshot.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [fixed] start_level does not work
PostPosted: Mon Jun 29, 2015 8:53 am 
Offline
Forum Members
Forum Members

Joined: Tue Oct 21, 2014 12:47 pm
Posts: 103
Location: Lorient (France)
It's partly fixed :

with :
\$1:
{* stylesheet  "Navigation Simple - Horizontal" *}
        <h2 class="accessibility">Navigation</h2>
        {Navigator loadprops=0 template='Simple Navigation' number_of_levels='1'}
        <hr class="accessibility" />
      </div>
{* End Navigation *}


the page display is correct but with :

\$1:
{* stylesheet  "Navigation Simple - Horizontal" *}
        <h2 class="accessibility">Navigation</h2>
        {Navigator loadprops=0 template='Simple Navigation' number_of_levels='1' start_level='1'}
        <hr class="accessibility" />
      </div>
{* End Navigation *}

the horizontal menu is not here
http://ciavatti.free.fr/cmsv2/cms-v23.JPG

try this :
\$1:
{* stylesheet  "Navigation Simple - Horizontal" *}
        <h2 class="accessibility">Navigation</h2>
        {Navigator loadprops=0 template='Simple Navigation' number_of_levels='1' start_level='0'}
        <hr class="accessibility" />
      </div>
{* End Navigation *}

the horizontal menu is come back : surprising, no?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] start_level does not work
PostPosted: Wed Jul 01, 2015 9:56 pm 
Offline
Forum Members
Forum Members

Joined: Tue Oct 21, 2014 12:47 pm
Posts: 103
Location: Lorient (France)
a video to see a difference between V1 and RC1 (same template, Top simple navigation + left subnavigation + 1 column, same hierarchy). Left menu stay on level 2 with V1 and does not with RC1. Is it an internal difference between V1 and RC1 or a difference in menu template coding?

http://ciavatti.free.fr/cmsv2/start_level.avi


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] start_level does not work
PostPosted: Thu Jul 02, 2015 10:43 am 
Offline
Forum Members
Forum Members

Joined: Tue Oct 21, 2014 12:47 pm
Posts: 103
Location: Lorient (France)
I have tested a little further by adding this code in "Top simple navigation + left subnavigation + 1 column" template :
\$1:

<p>Simple Navigation</p>
{Navigator loadprops=0 template='Simple Navigation' start_level='2' collapse='1'}
<p>cssmenu_ulshadow</p>
              {Navigator loadprops=0 template='cssmenu_ulshadow' start_level='2' collapse='1'}
<p>Simple Navigation Menu</p>
{Navigator loadprops=0 template='Simple Navigation Menu' start_level='2' collapse='1'}
<p>Simplex Footer Navigation</p>
{Navigator loadprops=0 template='Simplex Footer Navigation' start_level='2' collapse='1'}
<p>Simplex Main Navigation</p>
{Navigator loadprops=0 template='Simplex Main Navigation' start_level='2' collapse='1'}
<p>minimal_menu</p>
{Navigator loadprops=0 template='minimal_menu' start_level='2' collapse='1'}
<p>cssmenu</p>
{Navigator loadprops=0 template='cssmenu' start_level='2' collapse='1'}


the result is clear : none menu stays on level = 2 when exploring the different levels.

Now replace
\$1:
{Navigator loadprops=0 template='Simplex Main Navigation' start_level='2' collapse='1'}

by
\$1:
{Navigator loadprops=0 template='Simplex Main Navigation' start_level='3' collapse='1'}

For level value <3, css crash and page stops before template Simplex Main Navigation menu
http://ciavatti.free.fr/cmsv2/start_level32.JPG
For level value >=3, page works but template Simplex Main Navigation menu start at level 1 or 2.
http://ciavatti.free.fr/cmsv2/start_level31.JPG


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] start_level does not work
PostPosted: Fri Jul 03, 2015 5:38 pm 
Offline
Forum Members
Forum Members

Joined: Tue Oct 21, 2014 12:47 pm
Posts: 103
Location: Lorient (France)
tests on snapshot 2015-07-03 00:30

download database here for tests

http://ciavatti.free.fr/cmsv2/cmsrc1.sql(1).zip

then go to ele_1.2 in dropmenu ele_1

http://ciavatti.free.fr/cmsv2/cmsrc1_drop.JPG

you have a menu at level 2 ok that's right

http://ciavatti.free.fr/cmsv2/cmsrc1_ele_12.JPG

now select 1.2.2 in left menu

you have a menu at level 3

http://ciavatti.free.fr/cmsv2/cmsrc1_ele_122.JPG

select 1.2.2.1

at last you have a menu at level 4 that's not right at all

http://ciavatti.free.fr/cmsv2/cmsrc1_ele_1221.JPG

in the same template ("Top simple navigation + left subnavigation + 1 column") there is this menu tag
{menu template='simple_navigationV1' start_level='2' collapse='1'}
under <p>menu</p>
but there is no menu under the text "menu" ???


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] start_level does not work
PostPosted: Sat Jul 04, 2015 12:44 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8166
Location: Fernie British Columbia, Canada
I cross referenced the functionality between MenuManager and navigator.

MenuManager only supports a start_level >= 2
so I implemented that in Navigator.

I also tested the functionality, it seems to be working fine now.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] start_level does not work
PostPosted: Sat Jul 04, 2015 8:04 am 
Offline
Forum Members
Forum Members

Joined: Tue Oct 21, 2014 12:47 pm
Posts: 103
Location: Lorient (France)
It seems that you did not understand the problem (or my english ;) ). So, before spending time in tests could you answer those questions :
1 ) What can I expect when using start_level="2" in "Top simple navigation + left subnavigation + 1 column" template. I expect a left menu fixed at level 2 whatever the level of the page if his level is superior or equal to two. I expect to have all pages of level 2 of level 3 level4 ...level n-1 when I am on level n and when I change page on level 1 all its childrens on left menu.
2 ) how do you perform your tests? Did you use the database I sent in my previous message?

$1
$1


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] start_level does not work
PostPosted: Sat Jul 04, 2015 7:28 pm 
Offline
Forum Members
Forum Members

Joined: Tue Oct 21, 2014 12:47 pm
Posts: 103
Location: Lorient (France)
It is not fixed in snapshot 2015-07-04 12:30 :

The problem begin when the hierarchical level is sup to start_level.

Looking at the code I see you partly use the same code for childrenof (// now do a childrenof the last element.). I agree with that : start_level is a special childrenof fixed at a parent page of the actual page. The good parent page beeing at the start_level in the hierarchy. In the code I don't see where you find the correct page.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] start_level does not work
PostPosted: Sat Jul 04, 2015 9:48 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8166
Location: Fernie British Columbia, Canada
The start_level param should only be displaying the Nth level (>= 2) of the current page.

so given this hierarchy:
page 1 (alias=page_1)
page 1.1
page 1.2
page 1.1.1
page 1.1.2 <-- current page
page 1.1.3
page 1.3
page 2 (alias=page_2)
page 2.1

start_level=2 number_of_levels=1 should display:
page 1.1
page 1.2
page 1.3

because the system literally takes the herarchy of 1.1.2
and rebuilds N levels of the heirarchy i.e: 1.1
it should be exactly equivalent to: childrenof="page_1"

I will test further.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] start_level does not work
PostPosted: Sat Jul 04, 2015 9:58 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8166
Location: Fernie British Columbia, Canada
I setup exactly this page structure in a new svn install and indeed I saw the problem.

and made some very minor changes... it now seems to work as I expect.

should be available in the next snapshot.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] start_level does not work
PostPosted: Sun Jul 05, 2015 1:02 pm 
Offline
Forum Members
Forum Members

Joined: Tue Oct 21, 2014 12:47 pm
Posts: 103
Location: Lorient (France)
Don't works on snapshot 2015-07-05 00:30

I try this tag in V1, the result can be use with start_element
(it's part of your article in cms wiki)

\$1:
$manager = cmsms()->GetHierarchyManager();

$var = isset($params['assign']) ? $params['assign'] : 'root_page_id';

$result = "NO RESULT";
$thisPage = $smarty->get_template_vars('content_id');
$currentNode = $manager->sureGetNodeById($thisPage);

    $currentContent =& $currentNode->getContent();
    $result = $currentContent->Hierarchy();
//result is the hierarchy of the page
    $currentNode =& $currentNode->getParentNode();
//to test value of start level
$start_level=4;
if ($start_level >2)
//we extract the hierarchy corresponding to start_level
{$result=substr($result,0,$start_level+2);}
else
{$result=substr($result,0,$start_level+1);}

$smarty->assign($var,$result);


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

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