14. Language Overrides: Really cool
Joomla 2.5 Feature
Joomla's language manager allows you
to search, find, and override language
constants.
15. What are language constants?
Language constants are text strings, a
lot like variables, with a value
assigned them. They areused in
components, modules, and
plugins, and their purpose isto make
development and translation easier.
25. Understand the directory structure
We copy files from:
<joomla>components/com_content/views/featured/tmpl
and put them in:
<joomla>/templates/atomic/html/com_content/featured
27. What happened?
Joomla will check the loaded
template for any installed
components and views. If it
finds a match, it will load the
file in the template, and skip
the component.
31. Remember
• Only views can be overridden
• If the html directory doesn’t
exist, you can create it.
• Joomla will ‘know’
• If it doesn’t work, you probably
misspelled something
32. Important concepts
• The Rule
• The reason
• The exception
• Language Overrides
• Layout Overrides
33. Bonus features
• The Rule
• The reason
• The exception
• Language Overrides
• Layout Overrides
• Module Chrome
34. In template html add modules.php
Add this function:
function
modChrome_name($module, &$params, &$a
ttribs) {
echo $module->title;
echo $module->content;
}
35. In template index.php
Check out jdoc for modules
<jdoc:include type="modules" name="atomic-
bottomleft" style="name" />
36. Match it up
See that modChrome_name and the module
include uses the style name.
37. What does it mean?
We can now add any HTML or PHP
code to modules.php which can
change how module content is
presented in the template.
39. Bonus features
• The Rule
• The reason
• The exception
• Language Overrides
• Layout Overrides
• Module Chrome
40. Basic non-Joomla concept
CSS styles can be
overwritten by using
cascading order selection
statements.
41. Cascading order in CSS
CSS Code:
p {color:black;font-size:100%}
div.intro p {color:white;font-size:200%}
HTML code:
<p>A paragraph with black text</p>
<div class="intro">
<p>paragraph witwhite text</p>
</div>