Also notice that we do not use the full name of the sub-template; this is because the
loadTemnplate() method automatically prefixes the string default_ to the name.
We can take this a step further by restricting the sub-template to just one of the
templates. Imagine we have a template in a file called foobar.php. If we wanted
to make our default_form.php file unique to this template, all we need to do
is rename it. Instead of prefixing the file name with default_, we prefix it with
foobar_. The great thing about this is we do not need to alter the code.
Component Backend
When we build the backend of a component there are some very important things
that we need to be aware of. Components usually take advantage of the toolbar and
the submenu.
This is a screenshot of the Banner component:
Across the top is the toolbar, and across the bottom is the sub-menu. We'll discuss
how to modify these in a moment. First of all we need to be aware of the admin form.
Chapter 8
[ 215 ]
Admin Form
When we create templates for component backends that require a form, we must
always name the form adminForm.
Pages:
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298