Prev | Current Page 341 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

This link
will invoke the com_foobar component, and because the menu item is specified,
the active menu item will be menu item 53. Assuming this menu item is for the
corresponding component then the component parameters saved to the menu item
will be used.
In order to access the page parameters there is a useful method in the application,
getPageParameters(). We briefly mentioned this method in Chapter 4.
??? ??? ??? ??? ???
Customizing the Page
[ 258 ]
This method returns a JParameter object that is loaded with the Component and
Menu Item Parameters. The Menu Item Parameters always take precedence over the
component parameters. For example if the component defined a parameter foobar
and so did the menu item, the value recorded by the menu item would be the value
that would be used in the JParameter object.
It is common to use this method in the display() method of JView sub-classes
and assign the resultant object to the view for use by the layout. This example
demonstrates how we can do this:
$params =& $mainframe->getPageParameters();
$this->assignRef('params', $params);
We can then use params as an attribute in our template files.


Pages:
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
gry on line życzenia ślubne gustowne meble katowice felgi aluminiowe poznań katalog firm