Book Image

Learning Joomla! 1.5 Extension Development

Book Image

Learning Joomla! 1.5 Extension Development

Overview of this book

Table of Contents (17 chapters)
Learning Joomla! 1.5 Extension Development
Credits
About the Author
About the Reviewer
Preface

Parameters for components


Implementing parameters for plug-ins and modules is straightforward you add an XML file with the same name as the PHP file, then modify the code to extract the parameter values, and act accordingly. Components are slightly more complex. Although parameters can be implemented for the component as a whole, individual views can have them as well.

Adding parameters to the list view

Our current list view simply outputs a bulleted list of links to published reviews. With only a handful of reviews published, the frontend display looks bare. To fill it in, we can add the text from the quicktake field to show a brief description of each linked restaurant. When the reviews become more numerous, the site administrator can turn the quicktakes off to save space.

Instead of adding XML to a manifest file for the component, we will add one for the default layout in the list view. To do this, go to the /components/ com_restaurants/views/list/tmpl folder and create a file named...