<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tahar</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tahar"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Tahar"/>
	<updated>2026-10-15T10:07:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Accessing_the_database_using_JDatabase&amp;diff=15585</id>
		<title>Accessing the database using JDatabase</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Accessing_the_database_using_JDatabase&amp;diff=15585"/>
		<updated>2009-09-08T10:27:33Z</updated>

		<summary type="html">&lt;p&gt;Tahar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Joomla provides a sophisticated database abstraction layer to simplify the usage for 3PD. This guide should help you using this layer.&lt;br /&gt;
&lt;br /&gt;
==Why should I use the Joomla database class?==&lt;br /&gt;
Joomla has been built with the ability to use several different kinds of SQL-database-systems and to run in a variety of environments with different table-prefixes. In addition to these functions, the class automatically creates the database connection. Besides instantiating the object, at a minimum, you only need 2 lines of code to get a result from the database in a variety of formats. Using the Joomla database layer ensures a maximum of compatibility and flexibility for your extension.&lt;br /&gt;
&lt;br /&gt;
==Preparing the query==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Get a database object&lt;br /&gt;
$db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
&lt;br /&gt;
$query = &amp;quot;SELECT * FROM #__example_table WHERE id = 999999;&amp;quot;;&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First we instantiate the database object, then we prepare the query. You can use the normal SQL-syntax, the only thing you have to change is the table-prefix. To make this as flexible as possible, Joomla uses a placeholder for the prefix, the &amp;amp;ldquo;#__&amp;amp;rdquo;. In the next step, the $db-&amp;gt;setQuery(), this string is replaced with the correct prefix.&lt;br /&gt;
&lt;br /&gt;
Now, if we don&#039;t want to get information from the database, but insert a row into it, we need one more function. Every string-value in the SQL-syntax should be quoted. For example, MySQL uses backticks &amp;amp;#096;&amp;amp;#096; for names and single quotes &amp;amp;lsquo;&amp;amp;lsquo; for values. Joomla has some functions to do this for us and to ensure code compatibility between different databases. We can pass the names to the function $db-&amp;gt;nameQuote($name) and the values to the function $db-&amp;gt;Quote($value). &lt;br /&gt;
&lt;br /&gt;
A fully quoted query example is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &amp;quot;&lt;br /&gt;
  SELECT * &lt;br /&gt;
    FROM &amp;quot;.$db-&amp;gt;nameQuote(&#039;#__example_table&#039;).&amp;quot;  &lt;br /&gt;
    WHERE &amp;quot;.$db-&amp;gt;nameQuote(&#039;id&#039;).&amp;quot; = &amp;quot;.$db-&amp;gt;quote(&#039;999999&#039;).&amp;quot;;&lt;br /&gt;
  &amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Whatever we want to do, we have to set the query with the $db-&amp;gt;setQuery() function. Although you could write the query directly as a parameter for $db-&amp;gt;setQuery(), it&#039;s commonly done by first saving it in a variable, normally $query, and then handing this variable over. This helps writing clean, readable code.&lt;br /&gt;
&lt;br /&gt;
==== setQuery($query) ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;setQuery($query)&#039;&#039; method sets up a database query for later execution either by the query() method or one of the Load result methods.  &amp;lt;pre&amp;gt;$db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
$query = &amp;quot;/* some valid sql string */&amp;quot;;&lt;br /&gt;
$db-&amp;gt;setQuery($query);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
The parameter $query must be a valid sql string, it can either be added as a string parameter or as a variable; generally a variable is preferred as it leads to more legible code and can help in debugging.&lt;br /&gt;
&lt;br /&gt;
setQuery() also takes three other parameters: $offset, $limit - both used in list pagination; and $prefix - an alternative table prefix. All three of these variables have default values set and can usually be ignored. &lt;br /&gt;
&lt;br /&gt;
==Executing the Query==&lt;br /&gt;
To execute the query, Joomla provides several functions, which differ in their return value.&lt;br /&gt;
&lt;br /&gt;
=== Basic Query Execution ===&lt;br /&gt;
&lt;br /&gt;
==== query() ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;query()&#039;&#039; method is the the basic tool for executing sql queries on a database. In Joomla it is most often used for updating or administering the database simple because the various load methods detail on this page have the query step built in to them.&lt;br /&gt;
&lt;br /&gt;
The syntax is very straightforward:&amp;lt;pre&amp;gt;$db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
$query = &amp;quot;/* some valid sql string */&amp;quot;;&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;query();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: $query() returns an appropriate database resource if successful, or FALSE if not&lt;br /&gt;
&lt;br /&gt;
=== Query Execution Information ===&lt;br /&gt;
* getAffectedRows()&lt;br /&gt;
* explain()&lt;br /&gt;
* insertid()&lt;br /&gt;
&lt;br /&gt;
=== Insert Query Execution ===&lt;br /&gt;
* insertObject()&lt;br /&gt;
&lt;br /&gt;
==Query Results ==&lt;br /&gt;
The database class contains many methods for working with a query&#039;s result set.&lt;br /&gt;
&lt;br /&gt;
=== Single Value Result ===&lt;br /&gt;
&lt;br /&gt;
==== loadResult() ====&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;loadResult()&#039;&#039;&#039; when you expect just a single value back from your database query. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- &lt;br /&gt;
| 1 || style=&amp;quot;background:yellow&amp;quot; | John Smith || johnsmith@example.com || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Magda Hellman || magda_h@example.com || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@example.com || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is often the result of a &#039;count&#039; query to get a number of records:&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
$query = &amp;quot;&lt;br /&gt;
  SELECT COUNT(*)&lt;br /&gt;
    FROM &amp;quot;.$db-&amp;gt;nameQuote(&#039;#__my_table&#039;).&amp;quot;&lt;br /&gt;
    WHERE &amp;quot;.$db-&amp;gt;nameQuote(&#039;name&#039;).&amp;quot; = &amp;quot;.$db-&amp;gt;quote($value).&amp;quot;;&lt;br /&gt;
  &amp;quot;;&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$count = $db-&amp;gt;loadResult();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or where you are just looking for a single field from a single row of the table (or possibly a single field from the first row returned).&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
$query = &amp;quot;&lt;br /&gt;
  SELECT &amp;quot;.$db-&amp;gt;nameQuote(&#039;field_name&#039;).&amp;quot;&lt;br /&gt;
    FROM &amp;quot;.$db-&amp;gt;nameQuote(&#039;#__my_table&#039;).&amp;quot;&lt;br /&gt;
    WHERE &amp;quot;.$db-&amp;gt;nameQuote(&#039;some_name&#039;).&amp;quot; = &amp;quot;.$db-&amp;gt;quote($some_value).&amp;quot;;&lt;br /&gt;
  &amp;quot;;&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;loadResult();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Single Row Results ===&lt;br /&gt;
&lt;br /&gt;
Each of these results functions will return a single record from the database even though there may be several records that meet the criteria that you have set. To get more records you need to call the function again.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 1 || John Smith || johnsmith@example.com || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Magda Hellman || magda_h@example.com || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@example.com || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadRow() ====&lt;br /&gt;
&lt;br /&gt;
loadRow() returns an indexed array from a single record in the table: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadRow();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; 1 [1] =&amp;gt; John Smith [2] =&amp;gt; johnsmith@example.com [3] =&amp;gt; johnsmith ) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful&lt;br /&gt;
&lt;br /&gt;
==== loadAssoc() ====&lt;br /&gt;
&lt;br /&gt;
loadAssoc() returns an associated array from a single record in the table: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssoc();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;name&#039;] // e.g. $row[&#039;name&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful&lt;br /&gt;
&lt;br /&gt;
==== loadObject() ====&lt;br /&gt;
&lt;br /&gt;
loadObject returns a PHP object from a single record in the table: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;loadObject();&lt;br /&gt;
print_r($result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;stdClass Object ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$row-&amp;gt;index // e.g. $row-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful&lt;br /&gt;
&lt;br /&gt;
===Single Column Results ===&lt;br /&gt;
&lt;br /&gt;
Each of these results functions will return a single column from the database. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- &lt;br /&gt;
| 1 || style=&amp;quot;background:yellow&amp;quot; | John Smith || johnsmith@example.com || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || style=&amp;quot;background:yellow&amp;quot; | Magda Hellman || magda_h@example.com || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || style=&amp;quot;background:yellow&amp;quot; | Yvonne de Gaulle || ydg@example.com || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadResultArray() ====&lt;br /&gt;
&lt;br /&gt;
loadResultArray() returns an indexed array from a single column in the table: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$query = &amp;quot;&lt;br /&gt;
  SELECT name, email, username&lt;br /&gt;
    FROM . . . &amp;quot;;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$column= $db-&amp;gt;loadResultArray();&lt;br /&gt;
print_r($column);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; John Smith [1] =&amp;gt; Magda Hellman [2] =&amp;gt; Yvonne de Gaulle )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$column[&#039;index&#039;] // e.g. $column[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
# loadResultArray() is equivalent to loadResultArray(0)&lt;br /&gt;
&lt;br /&gt;
==== loadResultArray($index) ====&lt;br /&gt;
&lt;br /&gt;
loadResultArray($index) returns an indexed array from a single column in the table: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$query = &amp;quot;&lt;br /&gt;
  SELECT name, email, username&lt;br /&gt;
    FROM . . . &amp;quot;;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$column= $db-&amp;gt;loadResultArray(1);&lt;br /&gt;
print_r($column);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; johnsmith@example.com [1] =&amp;gt; magda_h@example.com [2] =&amp;gt; ydg@example.com )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$column[&#039;index&#039;] // e.g. $column[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
loadResultArray($index) allows you to iterate through a series of columns in the results&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
for ( $i = 0; $i &amp;lt;= 2; $i++ ) {&lt;br /&gt;
  $column= $db-&amp;gt;loadResultArray($i);&lt;br /&gt;
  print_r($column);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; John Smith [1] =&amp;gt; Magda Hellman [2] =&amp;gt; Yvonne de Gaulle )&lt;br /&gt;
Array ( [0] =&amp;gt; johnsmith@example.com [1] =&amp;gt; magda_h@example.com [2] =&amp;gt; ydg@example.com )&lt;br /&gt;
Array ( [0] =&amp;gt; johnsmith [1] =&amp;gt; magdah [2] =&amp;gt; ydegaulle )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
&lt;br /&gt;
=== Multi-Row Results ===&lt;br /&gt;
&lt;br /&gt;
Each of these results functions will return multiple records from the database. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 1 || John Smith || johnsmith@example.com || johnsmith&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 2 || Magda Hellman || magda_h@example.com || magdah&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@example.com || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadRowList() ====&lt;br /&gt;
&lt;br /&gt;
loadRowList() returns an indexed array of indexed arrays from the table records returned by the query: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadRowList();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; Array ( [0] =&amp;gt; 1 [1] =&amp;gt; John Smith [2] =&amp;gt; johnsmith@example.com [3] =&amp;gt; johnsmith ) &lt;br /&gt;
[1] =&amp;gt; Array ( [0] =&amp;gt; 2 [1] =&amp;gt; Magda Hellman [2] =&amp;gt; magda_h@example.com [3] =&amp;gt; magdah ) &lt;br /&gt;
[2] =&amp;gt; Array ( [0] =&amp;gt; 3 [1] =&amp;gt; Yvonne de Gaulle [2] =&amp;gt; ydg@example.com [3] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;][&#039;index&#039;] // e.g. $row[&#039;2&#039;][&#039;3&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
&lt;br /&gt;
==== loadAssocList() ====&lt;br /&gt;
&lt;br /&gt;
loadAssocList() returns an indexed array of associated arrays from the table records returned by the query: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssocList();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; Array ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith ) &lt;br /&gt;
[1] =&amp;gt; Array ( [id] =&amp;gt; 2 [name] =&amp;gt; Magda Hellman [email] =&amp;gt; magda_h@example.com [username] =&amp;gt; magdah ) &lt;br /&gt;
[2] =&amp;gt; Array ( [id] =&amp;gt; 3 [name] =&amp;gt; Yvonne de Gaulle [email] =&amp;gt; ydg@example.com [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;][&#039;column_name&#039;] // e.g. $row[&#039;2&#039;][&#039;email&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== loadAssocList($key) ====&lt;br /&gt;
&lt;br /&gt;
loadAssocList(&#039;key&#039;) returns an associated array - indexed on &#039;key&#039; - of associated arrays from the table records returned by the query: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssocList(&#039;username&#039;);&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[johnsmith] =&amp;gt; Array ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith ) &lt;br /&gt;
[magdah] =&amp;gt; Array ( [id] =&amp;gt; 2 [name] =&amp;gt; Magda Hellman [email] =&amp;gt; magda_h@example.com [username] =&amp;gt; magdah ) &lt;br /&gt;
[ydegaulle] =&amp;gt; Array ( [id] =&amp;gt; 3 [name] =&amp;gt; Yvonne de Gaulle [email] =&amp;gt; ydg@example.com [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;] // e.g. $row[&#039;johnsmith&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;][&#039;column_name&#039;] // e.g. $row[&#039;johnsmith&#039;][&#039;email&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Key must be a valid column name from the table; it does not have to be an Index or a Primary Key. But if it does not have a unique value you may not be able to retrieve results reliably.&lt;br /&gt;
&lt;br /&gt;
==== loadObjectList() ====&lt;br /&gt;
&lt;br /&gt;
loadObjectList() returns an indexed array of PHP objects from the table records returned by the query: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;loadObjectList();&lt;br /&gt;
print_r($result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; stdClass Object ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith &lt;br /&gt;
    [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith ) &lt;br /&gt;
[1] =&amp;gt; stdClass Object ( [id] =&amp;gt; 2 [name] =&amp;gt; Magda Hellman &lt;br /&gt;
    [email] =&amp;gt; magda_h@example.com [username] =&amp;gt; magdah ) &lt;br /&gt;
[2] =&amp;gt; stdClass Object ( [id] =&amp;gt; 3 [name] =&amp;gt; Yvonne de Gaulle &lt;br /&gt;
    [email] =&amp;gt; ydg@example.com [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;]-&amp;gt;name // e.g. $row[&#039;2&#039;]-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== loadObjectList(&#039;key&#039;) ====&lt;br /&gt;
&lt;br /&gt;
loadObjectList($key) returns an associated array - indexed on &#039;key&#039; - of objects from the table records returned by the query: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadObjectList(&#039;username&#039;);&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[johnsmith] =&amp;gt; stdClass Object ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith &lt;br /&gt;
    [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith ) &lt;br /&gt;
[magdah] =&amp;gt; stdClass Object ( [id] =&amp;gt; 2 [name] =&amp;gt; Magda Hellman &lt;br /&gt;
    [email] =&amp;gt; magda_h@example.com [username] =&amp;gt; magdah ) &lt;br /&gt;
[ydegaulle] =&amp;gt; stdClass Object ( [id] =&amp;gt; 3 [name] =&amp;gt; Yvonne de Gaulle &lt;br /&gt;
    [email] =&amp;gt; ydg@example.com [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;] // e.g. $row[&#039;johnsmith&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;]-&amp;gt;column_name // e.g. $row[&#039;johnsmith&#039;]-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Key must be a valid column name from the table; it does not have to be an Index or a Primary Key. But if it does not have a unique value you may not be able to retrieve results reliably.&lt;br /&gt;
&lt;br /&gt;
=== Misc Result Set Methods ===&lt;br /&gt;
&lt;br /&gt;
==== getNumRows() ====&lt;br /&gt;
&lt;br /&gt;
getNumRows() will return the number of result rows found by the last query and waiting to be read. To get a result from getNumRows() you have to run it &#039;&#039;&#039;after&#039;&#039;&#039; the query and &#039;&#039;&#039;before&#039;&#039;&#039; you have retrieved any results.  &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$db-&amp;gt;query();&lt;br /&gt;
$num_rows = $db-&amp;gt;getNumRows();&lt;br /&gt;
print_r($num_rows);&lt;br /&gt;
$result = $db-&amp;gt;loadRowList();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will return &amp;lt;pre&amp;gt;3&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: if you run getNumRows() after loadRowList() - or any other retrieval method - you may get a PHP Warning:&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: mysql_num_rows(): 80 is not a valid MySQL result resource &lt;br /&gt;
in D:\xampp\htdocs\joomla1.5a\libraries\joomla\database\database\mysql.php on line 344&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips, Tricks &amp;amp; FAQ==&lt;br /&gt;
We had a few people lately using sub-queries like these:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;SQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT * FROM #__example WHERE id IN (SELECT * FROM #__example2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
These kind of queries are only possible in MySQL 4.1 and above. Another way to achieve this, is splitting the query into two:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &amp;quot;SELECT * FROM #__example2&amp;quot;;&lt;br /&gt;
$database-&amp;gt;setQuery($query);&lt;br /&gt;
$query = &amp;quot;SELECT * FROM #__example WHERE id IN (&amp;quot;. implode(&amp;quot;,&amp;quot;, $database-&amp;gt;loadArray()) .&amp;quot;)&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Development]][[Category:Database]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tahar</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Using_Class_Suffixes&amp;diff=15540</id>
		<title>Using Class Suffixes</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Using_Class_Suffixes&amp;diff=15540"/>
		<updated>2009-08-30T03:28:16Z</updated>

		<summary type="html">&lt;p&gt;Tahar: /* Menu Class Suffix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will show you how to use Page, Module, and Menu Class Suffixes in Joomla! 1.5 to fine-tune the appearance of your site. For the tutorial, we will assume you have the Joomla! 1.5.9 Sample site available.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
Joomla! creates HTML pages that use [[Glossary#Cascading_Style_Sheet_.28CSS.29|Cascading Style Sheets]] to control the appearance of the page. This includes things like fonts, colors, margins, and background. The CSS files are part of your template.&lt;br /&gt;
&lt;br /&gt;
When Joomla! creates a page, it creates different CSS classes that are then referenced in the CSS file to specify which style will apply to which parts of the HTML page. These class names are pre-programmed into Joomla!. But Joomla! allows you to modify or add CSS classes by way of the Class Suffix parameters. This lets you fine-tune the appearance of specific pages with no programming and very little work. The best way to understand this is to see specific examples.&lt;br /&gt;
&lt;br /&gt;
==When Would You Use a Class Suffix?==&lt;br /&gt;
Say, for example, that your website contains a number of Section Blog layouts, each for a different Section. If you are happy to have all of these pages styled the same way, then you wouldn&#039;t need to use a Page Class Suffix. However, say you want each of these sections styled differently than the others. For example, maybe you want a different background color or image for each different section.&lt;br /&gt;
&lt;br /&gt;
Or say that you want the heading on your front page to look different than the heading on other pages.&lt;br /&gt;
&lt;br /&gt;
In both of these cases, if you modify the styling in your &amp;quot;template.css&amp;quot; file for the standard CSS classes, it will affect all Menu Items that use these CSS classes. For example, if you change the style for the CSS class &amp;quot;componentheading&amp;quot;, it will affect all of the Menu Items that use this class.&lt;br /&gt;
&lt;br /&gt;
However, if you add a unique Page Class Suffix to a Menu Item, then Joomla! will create new CSS classes for each individual Menu Item so you can style each one differently.&lt;br /&gt;
&lt;br /&gt;
==Page Class Suffix==&lt;br /&gt;
Before you start, make sure you have the Joomla! sample website available. Also, make sure the default template is set to &amp;quot;rhuk_milkyway&amp;quot; (in the Extensions &amp;amp;rarr; Template Manager). &lt;br /&gt;
&lt;br /&gt;
===How It Works Without a Page Class Suffix===&lt;br /&gt;
Before we add a Page Class Suffix, let&#039;s see how this pages works without one. In the front end, navigate to Example Pages &amp;amp;rarr; Section Blog. In your browser, select the option to view the page source code. For example, in Firefox, press Ctrl+U. In Internet Explorer, select View &amp;amp;rarr; Source. In Safari, select View &amp;amp;rarr; View Source.&lt;br /&gt;
&lt;br /&gt;
Using the &amp;quot;Find&amp;quot; command, find the first occurrence of the word &amp;quot;componentheading&amp;quot;. It should look like the following: &amp;lt;pre&amp;gt;&amp;lt;div class=&amp;quot;componentheading&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Browse down the file and find the following tags: &lt;br /&gt;
:&amp;lt;pre&amp;gt;&amp;lt;table class=&amp;quot;blog&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;pre&amp;gt;&amp;lt;table class=&amp;quot;contentpaneopen&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
:&amp;lt;pre&amp;gt;&amp;lt;td class=&amp;quot;contentheading&amp;quot; width=&amp;quot;100%&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
:&amp;lt;pre&amp;gt;&amp;lt;table class=&amp;quot;contentpaneopen&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&#039;&#039;Note: The following screenshots were made using the free Firefox add-in called &amp;quot;Firebug&amp;quot;. Firebug allows you to quickly see the relationship between the HTML elements in your source and the text and graphics shown on the page.  It is a very handy tool, and you can get it [https://addons.mozilla.org/en-US/firefox/addon/1843 here]. There is also a free video tutorial about using Firebug with Joomla! available [[Tutorial:Using_Firebug_With_Your_Joomla_Website|here]].&#039;&#039;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows you the &amp;quot;componentheading&amp;quot; class. It is the page title area above the blog article.&lt;br /&gt;
&lt;br /&gt;
[[Image:Componentheading_class_firebug.png]]&lt;br /&gt;
&lt;br /&gt;
This screenshot shows you the entire &amp;quot;blog&amp;quot; class. This is the outer table into which all of the articles will fit.&lt;br /&gt;
&lt;br /&gt;
[[Image:Blog_class_firebug.png]]&lt;br /&gt;
&lt;br /&gt;
The next screenshot shows you the &amp;quot;contentpaneopen&amp;quot; class for an article heading. This includes the article title and the PDF, Print, and Email icons to the right.&lt;br /&gt;
&lt;br /&gt;
[[Image:Contentpaneopen_class_title_firebug.png]]&lt;br /&gt;
&lt;br /&gt;
This screenshot shows you the &amp;quot;contentpaneopen&amp;quot; class for the body of the article. This includes the author and date information as well as the actual article text.&lt;br /&gt;
&lt;br /&gt;
[[Image:Contentpaneopen_class_article_firebug.png]]&lt;br /&gt;
&lt;br /&gt;
So this gives us a good understanding of how Joomla! allows us to style the elements on a Section Blog layout. Joomla! writes out these classes as part of the HTML. And the template contains CSS that provides the styling information for these various elements and classes.&lt;br /&gt;
&lt;br /&gt;
===Page Class Suffix (No Space)===&lt;br /&gt;
Now that we see how this works without a Page Class Suffix, let&#039;s try it with one. In the back end, navigate to Menus &amp;amp;rarr; Example Pages and click on &amp;quot;Section Blog&amp;quot;. This should display the &amp;quot;Menu Item: [Edit]&amp;quot; screen for the Section Blog Layout. Click Parameters (System) to show the System Parameters. In the &amp;quot;Page Class Suffix&amp;quot; field enter the value &amp;quot;_myBlogSuffix&amp;quot; and click the Save button.&lt;br /&gt;
&lt;br /&gt;
Now, go back to the front end and again navigate to Example Pages &amp;amp;rarr; Section Blog. Notice right away that we lost the styling for the page and article titles. Let&#039;s look closer to see why. &lt;br /&gt;
&lt;br /&gt;
Using the browser &amp;quot;Find&amp;quot; command, find the first occurrence of &amp;quot;_myBlogSuffix&amp;quot;. It is in a &amp;quot;div&amp;quot; tag and looks like this: &amp;lt;pre&amp;gt;&amp;lt;div class=&amp;quot;componentheading_myBlogSuffix&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt; If you look through the source, you should also see the following classes: &amp;lt;code&amp;gt;blog_myBlogSuffix&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;contentpaneopen_myBlogSuffix&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;contentheading_myBlogSuffix&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By adding the Page Class Suffix, we &#039;&#039;changed&#039;&#039; all of these class names. That means that special styling in the CSS file that refers to the &amp;quot;base&amp;quot; class names (like componentheading, blog, and so on) will not be applied, since those classes no longer exist on the page.&lt;br /&gt;
&lt;br /&gt;
Now, you can fix this problem by editing your templates CSS file to add the same styling for the new classes (for example, &amp;quot;componentheading_myBlogSuffix&amp;quot;). But there is a much easier way to do this -- simply by adding a leading space to the parameter.&lt;br /&gt;
&lt;br /&gt;
===Page Class Suffix (With a Leading Space)===&lt;br /&gt;
Again in the back end, go back to Menus &amp;amp;rarr; Example Pages &amp;amp;rarr; Section Blog. We&#039;re going to change the value of the Page Class Suffix. This time we&#039;re going to enter in a leading space and call it &amp;lt;space&amp;gt; + &amp;quot;myBlogClass&amp;quot;, as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Page_class_suffix_space.png]]&lt;br /&gt;
&lt;br /&gt;
Now, go back to the front end and re-display the Example Pages &amp;amp;rarr; Section Blog. Notice that our styling is back! Let&#039;s look at the HTML source to see what is going on. Open the source and find the first occurrence of &amp;quot;myBlogClass&amp;quot;. It should like this: &amp;lt;pre&amp;gt;&amp;lt;div class=&amp;quot;componentheading myBlogClass&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; Because we put a leading space in the Page Class Suffix, we created a second class instead of changing the name of the first class (which is allowed and supported by all modern browsers). So we didn&#039;t break any of the existing CSS styling for this page. (One warning: we need to make sure the new class name is different than any of the other class names used on the page. Otherwise, we might get styling we don&#039;t want.)&lt;br /&gt;
&lt;br /&gt;
===Add CSS Styling to New Class===&lt;br /&gt;
&lt;br /&gt;
At this point, we&#039;ve created a new CSS class in the HTML to allow for some new styling. Now we need to use this new class to actually change the look of our page. The first thing we need to do is find the applicable CSS file. In this case, it is &amp;lt;code&amp;gt;&amp;lt;joomla_root&amp;gt;/templates/rhuk_milkyway/css/template.css&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Let&#039;s say we want to add a background color, but only to this specific Section Blog. (Remember, if we wanted to just change all of the Section Blog pages in our site, we could just change the CSS styling for the base classes, such as &amp;quot;componentheading&amp;quot; or &amp;quot;blog&amp;quot;.) We need to do is figure out which area (&amp;quot;componentheading&amp;quot;, &amp;quot;blog&amp;quot;, or &amp;quot;contentpaneopen&amp;quot;) we want to style. Say we just wanted to style the &amp;quot;componentheading&amp;quot; area. &lt;br /&gt;
&lt;br /&gt;
First, let&#039;s use the CSS selector &amp;quot;div.myBlogClass&amp;quot; and add the following code to the end of our CSS file:&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
/* Custom Styling */&lt;br /&gt;
div.myBlogClass {&lt;br /&gt;
	background-color: #FFE4E1; /* mistyrose */	&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result is that the page heading now has the background color, as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Div_styling_example.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
Now this works fine in our example, because the other classes are defined for &amp;quot;table&amp;quot; tags and not &amp;quot;div&amp;quot; tags. But it is normally better to be more specific in our style selector by styling only those elements that have both the desired base class and the new class. For example, let&#039;s replace the code above with the following code: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;/* Custom Styling */&lt;br /&gt;
.blog.myBlogClass {&lt;br /&gt;
	background-color: #FAFAD2; /* lightgoldenrod */	&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This specifies that the new style will only be applied to elements that have both the &amp;quot;blog&amp;quot; and the &amp;quot;myBlogClass&amp;quot; styles. This gives us the background color over the entire &amp;quot;blog&amp;quot; area, as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Blog_styling_example.png]]&lt;br /&gt;
&lt;br /&gt;
The great thing about creating a &#039;&#039;new&#039;&#039; class (with the leading space trick) is that we don&#039;t need to copy all of the existing styling for the base classes. We can just focus on the new styling that we want. &lt;br /&gt;
&lt;br /&gt;
Now in this example, we focused on the Section Blog layout. The class names for different components might be different, but the process will be the same. The table below shows some common Joomla! layouts and a list of class names that can have Page Class Suffixes added.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Layout&lt;br /&gt;
! CSS Class Names Used&lt;br /&gt;
|-&lt;br /&gt;
| Article Layout&lt;br /&gt;
| componentheading, contentpaneopen, contentheading, contentpagetitle&lt;br /&gt;
|-&lt;br /&gt;
| Category Blog, Frontpage Blog, Section Blog&lt;br /&gt;
| componentheading, contentpagetitle, blog, contentpaneopen, contentheading, readon, blog_more&lt;br /&gt;
|-&lt;br /&gt;
| Category List, Section List&lt;br /&gt;
| componentheading, contentpane, contentdescription&lt;br /&gt;
|-&lt;br /&gt;
| Contact Category&lt;br /&gt;
| componentheading, contentpane, contentdescription, sectiontablefooter, sectiontableheader, category&lt;br /&gt;
|-&lt;br /&gt;
| Contact Layout&lt;br /&gt;
| componentheading, contentpaneopen, contentheading&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
So, to sum up what we have learned about using the Page Class Suffix parameter:&lt;br /&gt;
# Use a leading space to create a new CSS class. This way you don&#039;t have to worry about re-doing or breaking existing CSS styles.&lt;br /&gt;
# Look in the HTML source code to find the locations of the base and new classes. &lt;br /&gt;
# If desired, use Firebug to see which HTML elements correspond to which areas on the page.&lt;br /&gt;
# Add custom styling to the end of the &amp;quot;template.css&amp;quot; file, specifying both the name of the desired base class and the custom class in the form &amp;lt;code&amp;gt;.baseclass.customclass&amp;lt;/code&amp;gt; as in the example above.&lt;br /&gt;
&lt;br /&gt;
==Module Class Suffix==&lt;br /&gt;
The Module Class Suffix parameter works in the same way as the Page Class Suffix. Let&#039;s go through an example using the Latest News module.&lt;br /&gt;
&lt;br /&gt;
In the administrative back end, navigate to Extensions &amp;amp;rarr; Module Manager and find the &amp;quot;Latest News&amp;quot; module. Click on it to open it for editing, and enter &amp;lt;space&amp;gt; + &amp;quot;customLatestClass&amp;quot; in the Module Class Suffix parameter field, as shown below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_class_suffix_space.png]]&lt;br /&gt;
&lt;br /&gt;
Now, navigate to the home page in the front end and view the page source code. The screenshot below was made using the Firebug add-in tool. It shows the home page and the HTML and styling for the customised Latest News module.&lt;br /&gt;
&lt;br /&gt;
[[Image:Latest_news_custom_class.png]]&lt;br /&gt;
&lt;br /&gt;
In the upper part of the screen, outlined in light blue, is the &amp;quot;div&amp;quot; element for the module. Below, in the HTML window, we see the HTML as follows: &amp;lt;pre&amp;gt;&amp;lt;div class=&amp;quot;moduletable customLatestClass&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt; and then &amp;lt;pre&amp;gt;&amp;lt;ul class=&amp;quot;latestnews customLatestClass&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moduletable&amp;quot; and &amp;quot;latestnews&amp;quot; classes are created automatically. The new class, &amp;quot;customLatestNews&amp;quot; was created because we started the Module Class Suffix parameter with a leading space.&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s use our new class to add some custom styling. Again, go to the end of the templates/rhuk_milkyway/css/template.css file and add the following code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
div.customLatestClass {&lt;br /&gt;
	background-color: #FFFFD2;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div.customLatestClass h3, ul.customLatestClass, ul.customLatestClass a {&lt;br /&gt;
	color: #8B4513;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file and re-display the home page. It should look like the screenshot below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Latest_news_styled.png]]&lt;br /&gt;
&lt;br /&gt;
The CSS selector &amp;lt;code&amp;gt;div.customLatestClass&amp;lt;/code&amp;gt; sets the background color for the entire area. The three selectors &amp;lt;code&amp;gt;div.customLatestClass h3, ul.customLatestClass, ul.customLatestClass a&amp;lt;/code&amp;gt; select the font color for the &amp;quot;h3&amp;quot; heading, the bullets (&amp;quot;ul&amp;quot; tag), and the &amp;quot;a&amp;quot; tag, respectively. Note that, if we only wanted to style the &amp;quot;ul&amp;quot; element, we wouldn&#039;t need a Module Class Suffix unless we had more than one &amp;quot;Latest News&amp;quot; module. Instead, we could just have defined the CSS using the standard &amp;quot;latestnews&amp;quot; class.&lt;br /&gt;
&lt;br /&gt;
===Be careful not to break existing CSS styling===&lt;br /&gt;
&lt;br /&gt;
In menus, we need to be careful not to break existing CSS styling.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at how this works. In the administrative back end, navigate to Extensions &amp;amp;rarr; Module Manager and open the Main Menu for editing. Click on the Advanced Parameters. Notice that the Module Class Suffix is set to &amp;quot;_menu&amp;quot;, without a leading space.&lt;br /&gt;
&lt;br /&gt;
Now, go to the Home page in the front end and view the source code (or use Firebug). The screenshot below shows the HTML for the Main Menu. &lt;br /&gt;
&lt;br /&gt;
[[Image:Main_menu_div.png]]&lt;br /&gt;
&lt;br /&gt;
Notice that the class is called &amp;quot;module_menu&amp;quot; because of the Module Class Suffix. Also, notice that there is special styling in the &amp;quot;template.css&amp;quot; and &amp;quot;blue.css&amp;quot; files for the &amp;quot;module_menu&amp;quot; class. For example, there is a background image that provides part of the blue border around the menu. &lt;br /&gt;
&lt;br /&gt;
We can confirm this by returning to the back end and changing the Module Class Suffix to blank. Return to the Home page and refresh. Now the Main Menu will show without the special &amp;quot;module_menu&amp;quot; styling, as shown below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Main_menu_no_suffix.png]]&lt;br /&gt;
&lt;br /&gt;
This shows an important point. Existing modules, especially menus, may already have CSS styling that depends on Module Class Suffixes. So we need to be careful when making changes.&lt;br /&gt;
&lt;br /&gt;
What if we still wanted to add some special styling just to the Main Menu? One way is to get tricky and add a second CSS class to the existing suffix. To see this, return to the Module Manager in the back end and open the Main Menu for editing. This time, in the Module Class suffix, enter &amp;lt;code&amp;gt;_menu&amp;lt;/code&amp;gt;, a space, and then &amp;lt;code&amp;gt;myMenuClass&amp;lt;/code&amp;gt;, as shown below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_class_suffix_tricky.png]]&lt;br /&gt;
&lt;br /&gt;
Now, add the following code to the end of the templates/rhuk_milkyway/css/template.css file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
div.myNewClass {&lt;br /&gt;
	font-size: 1.2em;&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go back to the Home page and notice that now the font in the Main Menu is larger, as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Main_menu_custom_style.png]]&lt;br /&gt;
&lt;br /&gt;
If we open Firebug, we can see what the HTML and CSS looks like, as shown below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Firebug_custom_menu_class.png]]&lt;br /&gt;
&lt;br /&gt;
By putting a space between the &amp;quot;_menu&amp;quot; and &amp;quot;myNewClass&amp;quot;, we added the new class into the HTML. Then, by selecting the new class in the CSS file, we changed the font size.&lt;br /&gt;
&lt;br /&gt;
==Menu Class Suffix and Menu Tag ID==&lt;br /&gt;
All core modules allow you to enter a Module Class Suffix, as discussed above. Menu modules have two additional parameters: Menu Class Suffix and Menu Tag ID. Let&#039;s look at what these parameters do.&lt;br /&gt;
&lt;br /&gt;
===Menu Class Suffix===&lt;br /&gt;
&lt;br /&gt;
The Menu Class Suffix inserts an extra suffix in the class for the unordered list that builds up the menu. If unedited, the class is &amp;quot;menu&amp;quot;. If adding &amp;quot;_myMenuClass&amp;quot; under Advanced Parameters &amp;amp;rarr; Menu Class Suffix, the new tag will be &amp;quot;menu_myMenuClass&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(This behaviour is only for the Menu Style &amp;quot;List&amp;quot;. If choosing &amp;quot;Legacy - Vertical&amp;quot; or &amp;quot;Legacy - Horizontal&amp;quot;, the class suffix will be added to the links in the table; this suffix will then be &amp;quot;mainlevel_myMenuClass&amp;quot;. When choosing the Legacy Flat List, the suffix will be added to the links (as on the two other Legacy lists), but it will also be added to the ul tag, but as an id rather than a class; the id will be &amp;quot;mainlevel_myMenuClass&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
===Menu Tag ID parameter===&lt;br /&gt;
&lt;br /&gt;
Now, lets look at the Menu Tag ID parameter. Navigate to the back end, open the Main Menu module for editing, and enter &amp;quot;myTagID&amp;quot; in the Menu Tag ID parameter.&lt;br /&gt;
&lt;br /&gt;
Add the following code to the end of the templates/rhuk_milkyway/css/template.css file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
#myTagID {&lt;br /&gt;
	list-style-type: square;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, re-display the Home page to see the change. The bullets for the Main Menu should now appear as squares, as shown below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Main_menu_square_bullets.png]]&lt;br /&gt;
&lt;br /&gt;
Finally, we can look at the HTML and CSS in Firebug, as shown below. &lt;br /&gt;
&lt;br /&gt;
[[Image:Menu_tag_id_code.png]]&lt;br /&gt;
&lt;br /&gt;
Joomla! has added the attribute &amp;lt;code&amp;gt;id=&amp;quot;myTagID&amp;quot;&amp;lt;/code&amp;gt; to the &amp;quot;ul&amp;quot; tag for the Main Menu. This allowed us to change the style for this ID. Note that, since this is an &amp;quot;id&amp;quot; attribute, we use the CSS selector &amp;lt;code&amp;gt;#myTagID&amp;lt;/code&amp;gt; (with a &amp;quot;#&amp;quot; instead of a &amp;quot;.&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
The Class Suffix and Menu Tag ID parameters allow you to fine-tune the CSS styling of your web site. By using a leading space in the suffix name, we can create a new class. This is normally the preferred method, since, as long as the new class name does not conflict with an existing class, no existing styling will be broken.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Tahar</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Creating_a_submenu&amp;diff=15539</id>
		<title>J1.5:Creating a submenu</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Creating_a_submenu&amp;diff=15539"/>
		<updated>2009-08-30T03:08:54Z</updated>

		<summary type="html">&lt;p&gt;Tahar: /* Menu Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In Joomla!, submenus can be shown either as one menu with two or more levels or as completely separate menu modules. To show how to do this, we will step through creating a two-level menu and then see how to show it either as one large menu or as separate parent and child menus.&lt;br /&gt;
&lt;br /&gt;
==Example Data==&lt;br /&gt;
In our example, we will create a menu called &amp;quot;Pets&amp;quot;. It will have two top-level menu items called &amp;quot;Dogs&amp;quot; and &amp;quot;Cats&amp;quot;. Under Dogs, we will have &amp;quot;Collies&amp;quot; and &amp;quot;Greyhounds&amp;quot;. Under Cats we will have &amp;quot;Tabbies&amp;quot; and &amp;quot;Siamese&amp;quot;. So the structure of the Pets menu will be as follows:&lt;br /&gt;
*Dogs&lt;br /&gt;
**Collies&lt;br /&gt;
**Greyhounds&lt;br /&gt;
*Cats&lt;br /&gt;
**Tabbies&lt;br /&gt;
**Siamese&lt;br /&gt;
&lt;br /&gt;
==Menu and Menu Items==&lt;br /&gt;
To create this structure, we create one menu with two levels of Menu Items. Note that we do this whether we want to have everything shown as one large menu or whether we want to create separate menu modules (one parent menu and two child menus). We&#039;ll see how to do this later on, when we create the modules.&lt;br /&gt;
&lt;br /&gt;
Here are the steps to create the Menu and Menu Items.&lt;br /&gt;
# Create a new Menu in the Menu Manager called &amp;quot;Pets&amp;quot;. &lt;br /&gt;
# Add a new Menu Item called &amp;quot;Dogs&amp;quot;. For this example, we don&#039;t really care what the type of the Menu Items is. For example, you can just create one article called &amp;quot;Pet Menu Test&amp;quot; and then create all of the Menu Items as type &#039;&#039;&#039;Article &amp;amp;rarr; Article Layout&#039;&#039;&#039; and point to this article.&lt;br /&gt;
# Add a second Menu Item called &amp;quot;Collies&amp;quot; (again, Menu Type of Article Layout as above). In the Parent Item box, select &amp;quot;Dogs&amp;quot;, as shown below: [[Image:submenu_example1.png|frame|center]]&lt;br /&gt;
# Add a third Menu Item called &amp;quot;Greyhounds&amp;quot;, again making &amp;quot;Dogs&amp;quot; the Parent Item. (Remember, these can all point to the same article.)&lt;br /&gt;
# Add the &amp;quot;Cats&amp;quot; Menu Item. Be sure to make the Parent Item for this &amp;quot;Top&amp;quot;.&lt;br /&gt;
# Add the last two Menu Items, &amp;quot;Tabbies&amp;quot; and &amp;quot;Siamese&amp;quot;, making &amp;quot;Cats&amp;quot; the Parent Item for both.&lt;br /&gt;
&lt;br /&gt;
When you get done, the Menu Item Manager should look like the following:[[Image:submenu_example2.png|frame|center]]&lt;br /&gt;
&lt;br /&gt;
==Menu Modules==&lt;br /&gt;
At this point, we&#039;ve got the Menu and Menu Items done. Now we need to create the Menu Modules. In Joomla!, the Menu Module determines three main things: (1) what the menu looks like; (2) where on the page it will show; and (3) on which pages it will show. We will do two examples. In the first example, we will create one Menu Module that shows all of the items in one menu. In the second, we will create three separate menu modules to show the Pets, Dogs, and Cats menus as separate modules.&lt;br /&gt;
&lt;br /&gt;
===One Menu Module===&lt;br /&gt;
To show this as one module, follow these steps:&lt;br /&gt;
# Navigate to Extensions &amp;amp;rarr; Module Manager, click the &amp;quot;New&amp;quot; icon in the toolbar, and select &amp;quot;Menu&amp;quot;.&lt;br /&gt;
# Enter the Title as &amp;quot;Pets Menu&amp;quot; and Position as &amp;quot;left&amp;quot;.&lt;br /&gt;
# In the Menu Assignment, enter &amp;quot;Select Menu Item(s) from the List&amp;quot; and select &amp;quot;Home&amp;quot; (under &amp;quot;mainmenu&amp;quot;), and all of the Menu Items under the &amp;quot;pets-menu&amp;quot;.&lt;br /&gt;
# In Menu Name, select &amp;quot;pets-menu&amp;quot; from the drop-down list box. &lt;br /&gt;
# If you are using the default &amp;quot;rhuk_milkyway&amp;quot; template and want the menu to look like the other menus, in the Advanced Parameters enter &amp;quot;_menu&amp;quot; for Module Class Suffix.&lt;br /&gt;
&lt;br /&gt;
Now, navigate to the front-end home page. You should see the Pets Menu as shown below:[[Image:submenu_example3.png|frame|center]]Click on the Dogs Menu Item. The selected article displays and the Dogs menu expands to show the two submenu items, Collies and Greyhounds. Note that we can set a parameter in the Module Manager to always show submenu items. Here we have taken the default value of &amp;quot;No&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
Click on &amp;quot;Collies&amp;quot; and again the article changes. (Or it would if we had different articles for each Menu Item!) The screen should look like the one below: [[Image:submenu_example4.png|frame|center]]&lt;br /&gt;
&lt;br /&gt;
Notice that the Breadcrumbs now shows three levels: Home, Dogs, Collies. Because we used submenus, Joomla! &amp;quot;knows&amp;quot; that Collies is under Dogs.&lt;br /&gt;
&lt;br /&gt;
===Separate Menu Modules===&lt;br /&gt;
Now we will change our example to create three separate menus -- one for the top level (Dogs and Cats), one for the Dogs (Collies and Greyhounds), and one for the Cats (Tabbies and Siamese). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&#039;&#039;Note: Make sure that your Menu Items each have a unique Alias value. If you use the Copy command in the toolbar of the Menu Item Manager to create these Menu Items, the Alias will be the same as the item being copied. In this case, just edit the Alias value to make it unique (for example, the same as the Title). If you have duplicate Alias values, the menus will not work correctly if the parameter SEF URLs is set to Yes in Global Configuration.&#039;&#039;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To do this:&lt;br /&gt;
# Open the Pets Menu in the Module Manager and change the Title to &amp;quot;Pets Menu Top Level Only&amp;quot;.&lt;br /&gt;
# Select the Left Position.&lt;br /&gt;
# Under Module Parameters, select the Menu Name &amp;quot;Pets Menu&amp;quot;&lt;br /&gt;
# Under Module Parameters, change the Menu Style to &amp;quot;List&amp;quot;.&lt;br /&gt;
# Set the Start Level to &amp;quot;0&amp;quot; and the End Level to &amp;quot;1&amp;quot;.&lt;br /&gt;
# &#039;&#039;This is optional. It allows your template to apply special a menu style to the menu (a border, for example).&#039;&#039; In Advanced Module Parameters put &amp;quot;_menu&amp;quot; in Module Class Suffix.&lt;br /&gt;
# For submenu Dog, in extensions menu select Module Manager, click New and select Menu, and set the title to &amp;quot;Dogs Submenu&amp;quot;.&lt;br /&gt;
# Set the Position to &amp;quot;Left&amp;quot;.&lt;br /&gt;
# &#039;&#039;Now this part is very important.&#039;&#039; We only want this submenu to show when we are in one of the Dogs Menu Items. So, in the Menu Assignment box, select the three items &amp;quot;Dogs&amp;quot;, &amp;quot;Collies&amp;quot;, and &amp;quot;Greyhounds&amp;quot;, as shown below: [[Image:submenu_example5.png|frame|center]]&lt;br /&gt;
# Under Module Parameters, select the menu name &amp;quot;Pets Menu&amp;quot; and change the Menu Style to &amp;quot;List&amp;quot;.&lt;br /&gt;
# Set the Start Level to &amp;quot;1&amp;quot; and End Level &amp;quot;2&amp;quot;.&lt;br /&gt;
# &#039;&#039;This is optional.&#039;&#039; In Advanced Module Parameters, set Module Class Suffix to &amp;quot;_menu&amp;quot;.&lt;br /&gt;
# For the &amp;quot;Cats Submenu&amp;quot;, repeat steps from 7 to 12 except step 9. In the Menu Assignment box, select the items &amp;quot;Cat&amp;quot;, &amp;quot;Tabbies&amp;quot; and &amp;quot;Siamese&amp;quot; (so this menu will only show under these Menu Items).&lt;br /&gt;
&lt;br /&gt;
At this point, we have three menu modules all pointing to the Pets Menu. The only differences between them are (1) the Start and End Levels and (2) the Menu Item Assignment. &lt;br /&gt;
&lt;br /&gt;
Now, in the front end, navigate to the Home page. The &amp;quot;Pets Menu Top Level Only&amp;quot; menu should show. Select the &amp;quot;Dogs&amp;quot; Menu Item. Now, the &amp;quot;Dogs Submenu&amp;quot; should show as a separate menu, as shown below:[[Image:submenu_example7.png|frame|center]]&lt;br /&gt;
&lt;br /&gt;
Click on the Collies Menu Item and notice that again the Breadcrumbs shows the hierarchy of &amp;quot;Home&amp;quot;, &amp;quot;Dogs&amp;quot;, and &amp;quot;Collies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using this same technique, it is easy to create third-level submenus. You just make the Parent Menu Item a second-level submenu. Then you could use the same technique to create a separate Menu Module with Start Level of 2 and End Level of 3. This would show only the third-level Menu Items.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Tahar</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Moving_a_menu_to_a_different_position&amp;diff=15536</id>
		<title>J1.5:Moving a menu to a different position</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Moving_a_menu_to_a_different_position&amp;diff=15536"/>
		<updated>2009-08-30T02:55:00Z</updated>

		<summary type="html">&lt;p&gt;Tahar: /* Related Articles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{review}}&lt;br /&gt;
== Moving a menu to a different position ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Joomla! 1.5 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;&#039;Extensions&#039;&#039;&#039;&amp;gt;&#039;&#039;&#039;Module Manager&#039;&#039;&#039; and select the module that your menu is being displayed through.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Menu_Module.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next select the position that you would like your menu to be in on the front end of your site. (Positions vary from theme to theme so make sure you know your theme) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Menu_Module_position.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Joomla! 1.0 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;&#039;Modules&#039;&#039;&#039;&amp;gt;&#039;&#039;&#039;Site Modules&#039;&#039;&#039; and select the module that your menu is being displayed through.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_1_0.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next select the position that you would like your your menu to be in on the front end of your site.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_1_0_Positions.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Articles ==&lt;br /&gt;
&lt;br /&gt;
* [http://docs.joomla.org/Modules_Administrator Module Administrator]&lt;br /&gt;
* [http://docs.joomla.org/Screen.modules.15 Module Manager]&lt;/div&gt;</summary>
		<author><name>Tahar</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Moving_a_menu_to_a_different_position&amp;diff=15535</id>
		<title>J1.5:Moving a menu to a different position</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Moving_a_menu_to_a_different_position&amp;diff=15535"/>
		<updated>2009-08-30T02:52:37Z</updated>

		<summary type="html">&lt;p&gt;Tahar: /* Joomla! 1.5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{review}}&lt;br /&gt;
== Moving a menu to a different position ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Joomla! 1.5 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;&#039;Extensions&#039;&#039;&#039;&amp;gt;&#039;&#039;&#039;Module Manager&#039;&#039;&#039; and select the module that your menu is being displayed through.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Menu_Module.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next select the position that you would like your menu to be in on the front end of your site. (Positions vary from theme to theme so make sure you know your theme) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Menu_Module_position.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Joomla! 1.0 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to &#039;&#039;&#039;Modules&#039;&#039;&#039;&amp;gt;&#039;&#039;&#039;Site Modules&#039;&#039;&#039; and select the module that your menu is being displayed through.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_1_0.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next select the position that you would like your your menu to be in on the front end of your site.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Module_1_0_Positions.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Articles ==&lt;br /&gt;
&lt;br /&gt;
* [http://docs.joomla.org/Modules_Administrator Module Administrator]&lt;br /&gt;
* [http://docs.joomla.org/Screen.modules.15 Module Manger]&lt;/div&gt;</summary>
		<author><name>Tahar</name></author>
	</entry>
</feed>