[SOLVED!] (See post 4 ) Menus: Stopping and Starting

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

[SOLVED!] (See post 4 ) Menus: Stopping and Starting

Post by Andrew Prior »

I understand nodes and hierarchy, and also how to specify particular menu items by listing them by name. But is there a way where I could do this:

Menu [/parameter]
Some other code: maybe a graphic
Menu [/parameter: continue]

where the parameter would begin listing pages for say 10 items and then stop. And then at the second parameter begin at menu item 11.

Like you can do with news items:

Code: Select all

{news category='SA' summarytemplate='Front_Page_Summary' detailpage='Justice_Detail' detailpage='news-item-details' number='5' start='1'}
note: start='1'
then a picture, then...

Code: Select all

{news category='SA' summarytemplate='Front_Page_Summary' detailpage='Justice_Detail' detailpage='news-item-details' number='20' start='5'}
note: start='5'

Andrew
Last edited by Andrew Prior on Sat Sep 08, 2012 1:10 pm, edited 2 times in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menus: Stopping and Starting

Post by Dr.CSS »

Sounds like you want to add an image at certain points in the menu, the only way I know how to do this is to use the Image select in the options tab when editing/making a page, make a new content/page but not of Content type, sectionheader maybe, select an image for that 'page' set it to be the 11th page...
mrenigma
Forum Members
Forum Members
Posts: 48
Joined: Fri Aug 05, 2011 3:43 pm

Re: Menus: Stopping and Starting

Post by mrenigma »

You could definitely do something like this using smarty sections:
http://www.smarty.net/docsv2/en/languag ... ection.tpl

I would assign a start and max variable before calling the menu tag. Then the image you would like followed by a rewrite of the start and max variables with a new menu tag after...and repeat.

Some pseudo-code:

Code: Select all

{assign var="start" value=1}
{assign var="max" value=5}
{Menu template="imageMenu"}
<img alt="" title="" src="" />
~ Life is like water, every movement you make changes the way it flows ~
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

Re: Menus: Stopping and Starting

Post by Andrew Prior »

Dr CSS, thankyou. Your showed me the way although it nearly killed me getting there, being ignorant :-)

I made a copy of the simple_menu.tpl in the menu manager.

In that I changed this code

Code: Select all

{elseif $node->type == 'sectionheader'}
<li class="sectionheader">{$node->menutext}</span>
I removed the node->menu text and added the code which refers to the image that you set in the page options.

Code: Select all

{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span><img src="{$node->image}"  /></span>
I then made a copy of my template, which affects very many pages which I did not want to change and changed the menu to my new adjusted template to test it.

When it was ok I changed the section I wanted to contain images to the new template and added two pages which are section headers instead of being content pages.

You can see this at http://onemansweb.org/theology/a-diffic ... -1-26.html for example. (Note that the large image below the menu is not part of the menu code. The two small images of the windmill and the church are produced by the menu template.)

Thankyou very much for your assistance. Andrew Prior
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [SOLVED!] (See post 4 ) Menus: Stopping and Starting

Post by Dr.CSS »

Glad you got it, you might want to check it in html validator and for the menu images you do an alt...

<img src="{$node->image}" alt='{$node->menutext}' />
Post Reply

Return to “CMSMS Core”