Discussion: PHP MVC CMS -- Adding Dynamic Navigation Functionality
In the previous quiz, Online PHP Quiz, we tested our experience gained from the course.
4 messages from 4 displayed.
//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
In the previous quiz, Online PHP Quiz, we tested our experience gained from the course.
Hi Michael, we're glad you like the course As you said, the menu will be
visible on every subpage of your website. It's a similar thing to the flash
messages mechanism. I'd put it to the RouterController
(the
process()
method), instantiate your NavigationManager
there and pass data from it to the view as
$this->data['...']...
. Code rendering the menu items would then
be part of the layout.phtml
template.
You would create a navigation controller if you wanted it to be displayed on
a particular subpage only. You put the shared logic as messages, navigation,
layout and this stuff directly to the RouterController
.
If you needed any more help, just ask
Hello David,
So in the layout, I would place the same kind of php tags as you would for displaying the messages.
Place the controller logic in the RouterController(as in that calls the NavigationManager functions I want to use EG getNavUrls and passes the information into the view via the same data tags that were used for messages.
Thank you for your help.
I'll let you know how I go.
Visit the website for the ultimate battle royal experience. Download the game advance servers ff, explore immersive gameplay, and join millions worldwide in intense, fast-paced action. Survive, be the last one standing, and embrace the excitement of Free Fire!
4 messages from 4 displayed.