[PHP] Dynamic Navigation w/PHP
Hello All, I am looking for example code demonstrating the ability to dynamically modify website navigation based upon data in a database. Specifically what I am trying to figure out is how to control what pages are available based upon whether they have been enabled in the database. I am developing a template driven website, with content controlled by the database which indicates what the customer has opted for. While ten pages might be available and part of the web site template, a given customer may have only paid for four, thus when his site is hit, only those four pages will be available in the navigation elements. Should the customer care to request an additional feature (page), simply accessing the database and enabling it would make it immediately available. Any suggestions or pointers would be greatly appreciated. Michael
Re: [PHP] Dynamic Navigation w/PHP
Hi, You could try using a DHTML menu like the one at http://www.milonic.co.uk/menu The array of elements needed can be generated using PHP based on certain criteria. Let me know if you or anybody else would like a PHP script creating so that you could generate menus based on values that you have in PHP. Regards Andy. - Original Message - From: Mike Elkins [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 19, 2001 4:17 PM Subject: [PHP] Dynamic Navigation w/PHP Hello All, I am looking for example code demonstrating the ability to dynamically modify website navigation based upon data in a database. Specifically what I am trying to figure out is how to control what pages are available based upon whether they have been enabled in the database. I am developing a template driven website, with content controlled by the database which indicates what the customer has opted for. While ten pages might be available and part of the web site template, a given customer may have only paid for four, thus when his site is hit, only those four pages will be available in the navigation elements. Should the customer care to request an additional feature (page), simply accessing the database and enabling it would make it immediately available. Any suggestions or pointers would be greatly appreciated. Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Dynamic Navigation w/PHP
My website has a navigation menu that is written to the browser depending on what vars are set in the php script. I store all the link names in an array, then simply do a 'foreach' loop to write the output. This would allow me to add another menu item by just adding it into the array. Simple example: foreach($linkname as $key = $value) { echo a href={$linkname[$key]}.php{$linkname[$key]}/ABR\n; } You could do something similar to this, when you want a menu item to be enabled you could append it to the array. - Original Message - From: Andy Woolley [EMAIL PROTECTED] To: Mike Elkins [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, November 19, 2001 4:51 PM Subject: Re: [PHP] Dynamic Navigation w/PHP Hi, You could try using a DHTML menu like the one at http://www.milonic.co.uk/menu The array of elements needed can be generated using PHP based on certain criteria. Let me know if you or anybody else would like a PHP script creating so that you could generate menus based on values that you have in PHP. Regards Andy. - Original Message - From: Mike Elkins [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 19, 2001 4:17 PM Subject: [PHP] Dynamic Navigation w/PHP Hello All, I am looking for example code demonstrating the ability to dynamically modify website navigation based upon data in a database. Specifically what I am trying to figure out is how to control what pages are available based upon whether they have been enabled in the database. I am developing a template driven website, with content controlled by the database which indicates what the customer has opted for. While ten pages might be available and part of the web site template, a given customer may have only paid for four, thus when his site is hit, only those four pages will be available in the navigation elements. Should the customer care to request an additional feature (page), simply accessing the database and enabling it would make it immediately available. Any suggestions or pointers would be greatly appreciated. Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]