Reply to Re: Display Links

Your name:

Reply:


Posted by Jerry Stuckle on 06/14/07 12:31

jsd219 wrote:
> On Jun 13, 11:25 pm, petersprc <peters...@gmail.com> wrote:
>> You can generate the menu from an array. For example:
>>
>> $sections = array(
>> 'about' => array(
>> 'team' => 'Our Team',
>> 'directions' => 'Directions',
>> 'history' => 'History'
>> ),
>> 'services' => array(
>> 'design' => 'Design',
>> 'construction' => 'Building & Construction',
>> 'repair' => 'Repair'
>> )
>> )
>>
>> To print your menu:
>>
>> $currentSection = 'about';
>> $contents = $sections[$currentSection];
>> foreach ($contents as $dest => $title) {
>> $links .= "<li><a href=\"$item\">$title</a></li>"
>>
>> }
>>
>> On Jun 13, 11:12 pm, jsd219 <i...@musiclanerecording.com> wrote:
>>
>>> I am a newbie for sure;
>>> problem,
>>> I have a page that has dynamically generated sections at the top, when
>>> I click on one of the sections I would like the list of categories
>>> associated with the section to display in my left navigation; If I
>>> click a different section the current navigation list would be
>>> replaced by the categories associated with the new section I clicked
>>> on and so on.
>>> I am sure this is easy for most of you but it is killing me. :-)
>>> God bless
>>> jason
>
> I don't quite follow, :-) if you go to: http://www(dot)discbid(dot)net
> you can see what i am talking about. notice the section at the top
> next to catalog. It currently has 7 entries, camryn, deda,
> grandpa...but it can change. it is dynamically generated so the client
> can add to or take away any of these sections. when you click on one
> of the sections, the navigation bar at the left should populate with
> all the categories created under that section, this too is dynamically
> generated and can change.
>
> Any and all help is greatly appreciated
>
> God bless
> jason
>

Jason,

As Peter indicated, you need to generate the menu items dynamically.
When the user clicks on the top section, your code needs to handle the
change.

Basically in your case the link should be directed back at the same
page. Look at which parameter was passed (if any - the first time there
won't be a parameter) and build the appropriate menu. Then output the
entire page again.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация