SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 171 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"


This example shows how we could use a JError object, stored in $error, in
conjunction with a tailored layout:


code; ?>

message); ?>


Module Design
[ 126 ]
If we save this as a layout in the module's tmpl folder and call it _error.php, we
can proceed to use it. We use an underscore at the start of the name because it is an
internal template and we don't want it to appear in the selection of layouts. This
example shows how we can use the layout in conjunction with a JError object:
$result = modMyExtensionHelper::someMethod();
if (JError::isError($result))
{
$params->set('layout', '_error');
$error =& $result;
}
$layout = $params->get('layout', 'default');
require(JModuleHelper::getLayoutPath('mod_myextension', $layout));
Media
If you intend to include any images or other media files with your module, you
might want to add the files to the Joomla! root images folder. This is the folder that
the Joomla! Media Manager uses.


Pages:
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183