-
Book Overview & Buying
-
Table Of Contents
Mastering Joomla! 1.5 Extension and Framework Development Second Edition
By :
It is common to want to include additional assets in our extensions. Assets are normally media. An example would be image files. This is a list of common files that we might classify as assets:
JavaScript
Image
Cascading Style Sheet
Video
Flash
We deal with asset files in two common ways.
We can use the media tag in our extension XML manifest files to add assets to the Joomla! Media Manager. This is ideal if we want to allow users the right to modify the assets.
Within the media tag, we must detail each file that we intend to add. Unlike copying extension files, we cannot define folders that we want to copy into the Media Manager.
This example demonstrates how we can copy two images, foo.png and bar.jpg, from a folder in the extension archive named assets into the stories folder in the Media Manager:
<media destination="stories" folder="assets">
<filename>foo.png</filename>
<filename>bar.jpg</filename>
</media>The stories folder is a special folder...
Change the font size
Change margin width
Change background colour