We can create an
XML metadata file for each view and layout. In these files we can describe the view
or layout and we can define extra parameters for the menu item specific to the
specified layout.
Imagine we have a view named foobar, with two layouts: default.php and
alternative.php. The next figure describes the folder structure we would expect
to find in the views folder (for simplicity, only the files and folders that we are
discussing are included in the figure):
Chapter 9
[ 249 ]
When an administrator creates a link to this view, the options displayed will not give
any information beyond the names of the folders and files described above, as this
screenshot demonstrates:
Customizing the Page
[ 250 ]
The first element of this list that we will customize is the view name, 'Foobar'. To do
this we must create a file in the foobar folder called metadata.xml. This example
customizes the name and description of the foobar view:
Now if an administrator were to view the list of menu item types, 'Foobar' would be
replaced with the text 'My Complete Foobar Title' as defined in the view tag title
attribute.
Pages:
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344