<?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=KavaXtreme</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=KavaXtreme"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/KavaXtreme"/>
	<updated>2026-08-11T16:20:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=User:KavaXtreme&amp;diff=15735</id>
		<title>User:KavaXtreme</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=User:KavaXtreme&amp;diff=15735"/>
		<updated>2009-09-19T23:09:35Z</updated>

		<summary type="html">&lt;p&gt;KavaXtreme: /* Todo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is Sam, and I&#039;ve been using Joomla heavily since the start in 2005. In particular, I do a lot of Joomla template work as [http://www.sitecoffee.com/ my day job]. I&#039;m also the creator of the original [http://www.alledia.com/bolt/ &amp;quot;World&#039;s Fastest Joomla Template&amp;quot;].&lt;/div&gt;</summary>
		<author><name>KavaXtreme</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Page_Class_Suffix&amp;diff=15734</id>
		<title>Page Class Suffix</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Page_Class_Suffix&amp;diff=15734"/>
		<updated>2009-09-19T23:00:23Z</updated>

		<summary type="html">&lt;p&gt;KavaXtreme: more structure, added link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
You can use The Page Class Suffix parameter to create unique CSS classes that allow you to style one Menu Item differently than others. For a more complete definition of Page Class Suffixes, see the [[Glossary#Page_Class_Suffix | Joomla! Glossary]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
If you enter a Page Class Suffix with a leading space, a new CSS class will be created. If the parameter does not have a leading space, the CSS classes associated with this Menu Item (for example, &amp;quot;componentheading&amp;quot;) will be modified. The first method is normally preferred, since then you don&#039;t break any of the existing styling for the page elements, and you only need to add new CSS code for the new styling.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t use a leading space, you will need to copy all of the styling code for the Menu Item classes and duplicate it for the new CSS class before making your CSS changes.&lt;br /&gt;
&lt;br /&gt;
* See the tutorial [[Tutorial:Using_Class_Suffixes_in_Joomla!_1.5|Using Class Suffixes in Joomla! 1.5]] for a detailed example of using Page and Module Class Suffixes.&lt;br /&gt;
You can use The Page Class Suffix parameter to create unique CSS classes that allow you to style one Menu Item differently than others.&lt;br /&gt;
* Also see [[Using the Page Class Suffix in Template Code]] for additional applications.&lt;br /&gt;
&lt;br /&gt;
[[Category:Templates]]&lt;/div&gt;</summary>
		<author><name>KavaXtreme</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Talk:Page_Class_Suffix&amp;diff=15733</id>
		<title>Talk:Page Class Suffix</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Talk:Page_Class_Suffix&amp;diff=15733"/>
		<updated>2009-09-19T22:49:35Z</updated>

		<summary type="html">&lt;p&gt;KavaXtreme: /* Could you write a Tips &amp;amp; Techinques article about this? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Apologies for the following rant, but this sounds like &amp;quot;Page class suffix&amp;quot; would be a good feature to use, where in fact &#039;&#039;&#039;it is not&#039;&#039;&#039;, because if used, it can quickly result in a very big stylesheet mess. &#039;&#039;&#039;It&#039;s the worst feature&#039;&#039;&#039; Joomla! (still) offers -- thanks to the obsolete, unintended backward compatibility with a dead browser named &amp;quot;Netscape Navigator 4&amp;quot; and unfortunately carried over from Mambo.&lt;br /&gt;
&lt;br /&gt;
I suspect that the implementation dates back to the old days when web designers still had to fight the buggy implementation of CSS in Netscape&#039;s browser, who required repetitive and additional selectors and rules whenever a page was disrupted by things like TABLEs, and at the same time being completely unaware of multiple classnames. &#039;&#039;This browser is dead for good!&#039;&#039; but eight years later, it&#039;s legacy is still with us in the core templates of Joomla! (I&#039;m going to write a {{jforum|wp|White Paper for 1.6}} so we can get rid of this, finally.)&lt;br /&gt;
&lt;br /&gt;
No graphical browser released in the last 7-8 years had required such a &#039;&#039;bad workaround&#039;&#039; in order to style individual pages. While the idea itself is nice, a proper implementation, facing reality of the 21st century, would apply the value of &#039;pageclass_sfx&#039; to the BODY element &#039;&#039;&#039;only&#039;&#039;&#039;, and nowhere else.&lt;br /&gt;
&lt;br /&gt;
Nobody with a good understanding of how Cascading Style Sheets &#039;&#039;really&#039;&#039; work would ever use this parameter as unfortunately demonstrated in the overrides of Beez and the way it&#039;s applied in the core &amp;quot;views&amp;quot;. The implementation is so unbelievable utterly &#039;&#039;wrong&#039;&#039;, it successfully destroys the [http://www.w3.org/TR/CSS21/cascade.html cascade and inheritance rules of CSS].&lt;br /&gt;
&lt;br /&gt;
Template Designers and Users should in fact be warned to &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;not use the Page class suffix at all&amp;lt;/span&amp;gt;&#039;&#039;&#039; in combination with any view template or override that contains the following statements all over the place:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class=&amp;quot;contentpaneopen&amp;lt;?php echo $this-&amp;gt;params-&amp;gt;get( &#039;pageclass_sfx&#039; ); ?&amp;gt;&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Read: get rid of the misbehaviour to concatene and thereby create &#039;&#039;brand new&#039;&#039; classnames using the &#039;&#039;&#039;best new feature&#039;&#039;&#039; of J! 1.5: template overrides.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Comment on the above:&lt;br /&gt;
I think that before throwing away the page suffix class feature, we have to find another solution for multi-lingual sites, which use RTL and LTR content in the same site.&lt;br /&gt;
It is impractical to change style direction on paragraph basis, and it does not influence headings.&lt;br /&gt;
Page suffix class enables (to limited extent) a RTL suffix, that will make all the content in some pages Right to left, within a Left to right site.&lt;br /&gt;
Template overriding  is not a good solution to the above issue.&lt;br /&gt;
&lt;br /&gt;
:Intersting argument. There&#039;s actually another (and better?) way to determine the writing direction in J!1.5 -- at least per article: the content language setting in the parameters. If J! wouldn&#039;t limit this to the languages installed but make this a &amp;quot;free&amp;quot; choice, this parameter can be used to determine (by language) whether the page should run RTL or LTR. Like adding the pageclass_sfx, adding the &#039;&#039;dir&#039;&#039; attribute nonetheless has to happen inside the templates. Per paragraph and per &amp;quot;word&amp;quot; tagging is still possible and necessary using HTML attributes; i.e. english text in a hebrew article or vice versa. Adding a parameter for RTL/LTR is a no-brainer as is &amp;quot;teaching&amp;quot; the templates to recognise it.&lt;br /&gt;
:I&#039;m not against pageclass_sfx in general; I think the way it is (still) implemented in the core templates is plain wrong and counter productive in regards of using &#039;&#039;&#039;Cascading&#039;&#039;&#039; Style Sheets. --&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[[User:CirTap|CirTap]] &amp;lt;small&amp;gt;([[User talk:CirTap|talk]] • [[Special:Contributions/CirTap|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/span&amp;gt; 05:45, 23 July 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
== You get a new CSS class if you use a leading space ==&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know if this changes your thinking or not, but if you enter the parameter with a leading space you get a new CSS class, which makes this much easier to work with. [[User:Dextercowley|Mark Dexter]] 21:01, 16 January 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Cascading Page Classes ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;suffix&amp;quot; is the outdated aspect of page class suffixes. The modern best practice approach would be to use page classes applied to the body tag, unleashing the cascading aspect of stylesheets. This means both leaner CSS and much greater flexibility in styling ANY element on the page. It also compliments and simplifies template overrides. This approach can already be applied in Joomla 1.5.x by adding the following code to the template&#039;s index.php file:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;?php&lt;br /&gt;
   $menus = &amp;amp;JSite::getMenu();&lt;br /&gt;
   $menu = $menus-&amp;gt;getActive();&lt;br /&gt;
   $pageclass = &amp;quot;&amp;quot;;&lt;br /&gt;
   if (is_object( $menu )) :&lt;br /&gt;
      $params = new JParameter( $menu-&amp;gt;params );&lt;br /&gt;
      $pageclass = $params-&amp;gt;get( &#039;pageclass_sfx&#039; );&lt;br /&gt;
   endif; &lt;br /&gt;
   ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;body id=&amp;quot;&amp;lt;?php echo $pageclass; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(credit: [http://forum.joomla.org/viewtopic.php?p=1353495#p1353495 Page Class Suffix in template code])&lt;br /&gt;
&lt;br /&gt;
An alternative use of this approach would be to load a stylesheet unique to the page in question:&lt;br /&gt;
   &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;templates/&amp;lt;?php echo $this-&amp;gt;template ?&amp;gt;/css/&amp;lt;?php echo $pageclass ?&amp;gt;.css&amp;quot; type=&amp;quot;text/css&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Could you write a Tips &amp;amp; Techinques article about this? ===&lt;br /&gt;
This looks very interesting. Do you think you could write a short Tips &amp;amp; Techniques article in the Wiki about this, with an example of how this would work in both of your scenarios? If so, that would be really helpful to a lot of people. Thanks. [[User:Dextercowley|Mark Dexter]] 20:48, 7 September 2009 (UTC)&lt;br /&gt;
:Will do. I&#039;ll try to have something up within a week or two. [[User:KavaXtreme|KavaXtreme]] 19:09, 8 September 2009 (UTC)&lt;br /&gt;
::Here it is: [[Using the Page Class Suffix in Template Code]]. [[User:KavaXtreme|KavaXtreme]] 22:49, 19 September 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>KavaXtreme</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Using_the_Page_Class_Suffix_in_Template_Code&amp;diff=15732</id>
		<title>Using the Page Class Suffix in Template Code</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Using_the_Page_Class_Suffix_in_Template_Code&amp;diff=15732"/>
		<updated>2009-09-19T22:46:23Z</updated>

		<summary type="html">&lt;p&gt;KavaXtreme: New page: Sometimes web designers need to access a page class suffix from directly within a template. A common reason to do this is...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sometimes web designers need to access a [[Tutorial:Using_Class_Suffixes_in_Joomla!_1.5#Page_Class_Suffix|page class suffix]] from directly within a template. A common reason to do this is to assign unique styles to individual pages linked from a menu (e.g. to change the dominant color on that page). By default Joomla applies the page class suffixes only to limited areas of a page, which often doesn&#039;t offer enough flexibility. However, by making some simple changes to your template you can take advantage of the cascading nature of stylesheets to apply unique styles to any element on a page.&lt;br /&gt;
&lt;br /&gt;
== Load Suffix ==&lt;br /&gt;
First, we need to find out what the page class suffix is for the page we are visiting. To do this, you will need add some code to your template:&lt;br /&gt;
# Open your template&#039;s index.php file (located in /templates/*template-name*/)&lt;br /&gt;
# Find the &amp;lt;head&amp;gt; tag in the index.php, near the top area of the template&lt;br /&gt;
# Above this, insert one of the following code blocks (Either of the following options will work fine in most cases. However they work slightly differently, so in certain cases your needs may dictate a specific choice.)&lt;br /&gt;
&lt;br /&gt;
=== By Itemid ===&lt;br /&gt;
To load the page class suffix associated with the current Itemid, add this to the top of the index.php file:&lt;br /&gt;
  &amp;lt;?php&lt;br /&gt;
    $itemid = JRequest::getVar(&#039;Itemid&#039;);&lt;br /&gt;
    $menu = &amp;amp;JSite::getMenu();&lt;br /&gt;
    $active = $menu-&amp;gt;getItem($itemid);&lt;br /&gt;
    $params = $menu-&amp;gt;getParams( $active-&amp;gt;id );&lt;br /&gt;
    $pageclass = $params-&amp;gt;get( &#039;pageclass_sfx&#039; );&lt;br /&gt;
  ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== By Active Menu Item ===&lt;br /&gt;
To load the page class suffix associated with the active menu item, add this to the top of the index.php file: (For sub-pages with no active menu item, this will load the page class suffix for the default menu item.)&lt;br /&gt;
  &amp;lt;?php&lt;br /&gt;
    $menu = &amp;amp;JSite::getMenu();&lt;br /&gt;
    $active = $menu-&amp;gt;getActive();&lt;br /&gt;
    $pageclass = &amp;quot;&amp;quot;;&lt;br /&gt;
    if (is_object( $active )) :&lt;br /&gt;
      $params = new JParameter( $active-&amp;gt;params );&lt;br /&gt;
      $pageclass = $params-&amp;gt;get( &#039;pageclass_sfx&#039; );&lt;br /&gt;
    endif; &lt;br /&gt;
  ?&amp;gt;&lt;br /&gt;
(credit: [http://forum.joomla.org/viewtopic.php?p=1353495#p1353495 Page Class Suffix in template code])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Insert Suffix ==&lt;br /&gt;
The next step is to use the page class suffix somewhere in the template. &lt;br /&gt;
&lt;br /&gt;
=== In the Body Tag ===&lt;br /&gt;
The more common method would be to apply the page class suffix as an id or class to the &amp;lt;body&amp;gt; tag. Find the &amp;lt;body&amp;gt; tag (below the &amp;lt;/head&amp;gt; tag) and replace it with this:&lt;br /&gt;
  &amp;lt;body id=&amp;quot;&amp;lt;?php echo $pageclass ? $pageclass : &#039;default&#039;; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== To Load a Page-Specific Stylesheet ===&lt;br /&gt;
The second method would be to load a stylesheet unique to the page in question. Instead of modifying the &amp;lt;body&amp;gt; tag, look for the stylesheet link within the &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt; tags and add the following line directly beneath it:&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;templates/&amp;lt;?php echo $this-&amp;gt;template ?&amp;gt;/css/&amp;lt;?php echo $pageclass ?&amp;gt;.css&amp;quot; type=&amp;quot;text/css&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefits ==&lt;br /&gt;
Using this approach to implement page class suffixes rather than the default approach has several benefits:&lt;br /&gt;
* leaner CSS &lt;br /&gt;
* much greater flexibility in styling &#039;&#039;&#039;any&#039;&#039;&#039; element on the page&lt;br /&gt;
* compliments and simplifies template overrides&lt;br /&gt;
&lt;br /&gt;
[[Category:Tips and tricks 1.5]]&lt;/div&gt;</summary>
		<author><name>KavaXtreme</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=User:KavaXtreme&amp;diff=15592</id>
		<title>User:KavaXtreme</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=User:KavaXtreme&amp;diff=15592"/>
		<updated>2009-09-08T19:52:28Z</updated>

		<summary type="html">&lt;p&gt;KavaXtreme: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is Sam, and I&#039;ve been using Joomla heavily since the start in 2005. In particular, I do a lot of Joomla template work as [http://www.sitecoffee.com/ my day job]. I&#039;m also the creator of the original [http://www.alledia.com/bolt/ &amp;quot;World&#039;s Fastest Joomla Template&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
== Todo ==&lt;br /&gt;
Page Class Tip - http://docs.joomla.org/Category:Tips_and_tricks_1.5&lt;/div&gt;</summary>
		<author><name>KavaXtreme</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=User:KavaXtreme&amp;diff=15591</id>
		<title>User:KavaXtreme</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=User:KavaXtreme&amp;diff=15591"/>
		<updated>2009-09-08T19:51:39Z</updated>

		<summary type="html">&lt;p&gt;KavaXtreme: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is Sam, and I&#039;ve been using Joomla heavily since the start in 2005. In particular, I do a lot of Joomla template work as [http://www.sitecoffee.com/ my day job]. I&#039;m also the creator of the original [http://www.alledia.com/bolt/ &amp;quot;Fastest Joomla Template&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
== Todo ==&lt;br /&gt;
Page Class Tip - http://docs.joomla.org/Category:Tips_and_tricks_1.5&lt;/div&gt;</summary>
		<author><name>KavaXtreme</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=User:KavaXtreme&amp;diff=15590</id>
		<title>User:KavaXtreme</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=User:KavaXtreme&amp;diff=15590"/>
		<updated>2009-09-08T19:44:19Z</updated>

		<summary type="html">&lt;p&gt;KavaXtreme: New page: My name is Sam, and I&amp;#039;ve been using Joomla heavily since the start in 2005. In particular, I do a lot of Joomla template work as [http://www.sitecoffee.com/ my day job]. I&amp;#039;m also the creat...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is Sam, and I&#039;ve been using Joomla heavily since the start in 2005. In particular, I do a lot of Joomla template work as [http://www.sitecoffee.com/ my day job]. I&#039;m also the creator of the original [http://www.alledia.com/bolt/ &amp;quot;Fastest Joomla Template&amp;quot;].&lt;/div&gt;</summary>
		<author><name>KavaXtreme</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Talk:Page_Class_Suffix&amp;diff=15589</id>
		<title>Talk:Page Class Suffix</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Talk:Page_Class_Suffix&amp;diff=15589"/>
		<updated>2009-09-08T19:09:28Z</updated>

		<summary type="html">&lt;p&gt;KavaXtreme: /* Could you write a Tips &amp;amp; Techinques article about this? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Apologies for the following rant, but this sounds like &amp;quot;Page class suffix&amp;quot; would be a good feature to use, where in fact &#039;&#039;&#039;it is not&#039;&#039;&#039;, because if used, it can quickly result in a very big stylesheet mess. &#039;&#039;&#039;It&#039;s the worst feature&#039;&#039;&#039; Joomla! (still) offers -- thanks to the obsolete, unintended backward compatibility with a dead browser named &amp;quot;Netscape Navigator 4&amp;quot; and unfortunately carried over from Mambo.&lt;br /&gt;
&lt;br /&gt;
I suspect that the implementation dates back to the old days when web designers still had to fight the buggy implementation of CSS in Netscape&#039;s browser, who required repetitive and additional selectors and rules whenever a page was disrupted by things like TABLEs, and at the same time being completely unaware of multiple classnames. &#039;&#039;This browser is dead for good!&#039;&#039; but eight years later, it&#039;s legacy is still with us in the core templates of Joomla! (I&#039;m going to write a {{jforum|wp|White Paper for 1.6}} so we can get rid of this, finally.)&lt;br /&gt;
&lt;br /&gt;
No graphical browser released in the last 7-8 years had required such a &#039;&#039;bad workaround&#039;&#039; in order to style individual pages. While the idea itself is nice, a proper implementation, facing reality of the 21st century, would apply the value of &#039;pageclass_sfx&#039; to the BODY element &#039;&#039;&#039;only&#039;&#039;&#039;, and nowhere else.&lt;br /&gt;
&lt;br /&gt;
Nobody with a good understanding of how Cascading Style Sheets &#039;&#039;really&#039;&#039; work would ever use this parameter as unfortunately demonstrated in the overrides of Beez and the way it&#039;s applied in the core &amp;quot;views&amp;quot;. The implementation is so unbelievable utterly &#039;&#039;wrong&#039;&#039;, it successfully destroys the [http://www.w3.org/TR/CSS21/cascade.html cascade and inheritance rules of CSS].&lt;br /&gt;
&lt;br /&gt;
Template Designers and Users should in fact be warned to &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;not use the Page class suffix at all&amp;lt;/span&amp;gt;&#039;&#039;&#039; in combination with any view template or override that contains the following statements all over the place:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class=&amp;quot;contentpaneopen&amp;lt;?php echo $this-&amp;gt;params-&amp;gt;get( &#039;pageclass_sfx&#039; ); ?&amp;gt;&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Read: get rid of the misbehaviour to concatene and thereby create &#039;&#039;brand new&#039;&#039; classnames using the &#039;&#039;&#039;best new feature&#039;&#039;&#039; of J! 1.5: template overrides.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Comment on the above:&lt;br /&gt;
I think that before throwing away the page suffix class feature, we have to find another solution for multi-lingual sites, which use RTL and LTR content in the same site.&lt;br /&gt;
It is impractical to change style direction on paragraph basis, and it does not influence headings.&lt;br /&gt;
Page suffix class enables (to limited extent) a RTL suffix, that will make all the content in some pages Right to left, within a Left to right site.&lt;br /&gt;
Template overriding  is not a good solution to the above issue.&lt;br /&gt;
&lt;br /&gt;
:Intersting argument. There&#039;s actually another (and better?) way to determine the writing direction in J!1.5 -- at least per article: the content language setting in the parameters. If J! wouldn&#039;t limit this to the languages installed but make this a &amp;quot;free&amp;quot; choice, this parameter can be used to determine (by language) whether the page should run RTL or LTR. Like adding the pageclass_sfx, adding the &#039;&#039;dir&#039;&#039; attribute nonetheless has to happen inside the templates. Per paragraph and per &amp;quot;word&amp;quot; tagging is still possible and necessary using HTML attributes; i.e. english text in a hebrew article or vice versa. Adding a parameter for RTL/LTR is a no-brainer as is &amp;quot;teaching&amp;quot; the templates to recognise it.&lt;br /&gt;
:I&#039;m not against pageclass_sfx in general; I think the way it is (still) implemented in the core templates is plain wrong and counter productive in regards of using &#039;&#039;&#039;Cascading&#039;&#039;&#039; Style Sheets. --&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[[User:CirTap|CirTap]] &amp;lt;small&amp;gt;([[User talk:CirTap|talk]] • [[Special:Contributions/CirTap|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/span&amp;gt; 05:45, 23 July 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
== You get a new CSS class if you use a leading space ==&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know if this changes your thinking or not, but if you enter the parameter with a leading space you get a new CSS class, which makes this much easier to work with. [[User:Dextercowley|Mark Dexter]] 21:01, 16 January 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Cascading Page Classes ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;suffix&amp;quot; is the outdated aspect of page class suffixes. The modern best practice approach would be to use page classes applied to the body tag, unleashing the cascading aspect of stylesheets. This means both leaner CSS and much greater flexibility in styling ANY element on the page. It also compliments and simplifies template overrides. This approach can already be applied in Joomla 1.5.x by adding the following code to the template&#039;s index.php file:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;?php&lt;br /&gt;
   $menus = &amp;amp;JSite::getMenu();&lt;br /&gt;
   $menu = $menus-&amp;gt;getActive();&lt;br /&gt;
   $pageclass = &amp;quot;&amp;quot;;&lt;br /&gt;
   if (is_object( $menu )) :&lt;br /&gt;
      $params = new JParameter( $menu-&amp;gt;params );&lt;br /&gt;
      $pageclass = $params-&amp;gt;get( &#039;pageclass_sfx&#039; );&lt;br /&gt;
   endif; &lt;br /&gt;
   ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;body id=&amp;quot;&amp;lt;?php echo $pageclass; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(credit: [http://forum.joomla.org/viewtopic.php?p=1353495#p1353495 Page Class Suffix in template code])&lt;br /&gt;
&lt;br /&gt;
An alternative use of this approach would be to load a stylesheet unique to the page in question:&lt;br /&gt;
   &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;templates/&amp;lt;?php echo $this-&amp;gt;template ?&amp;gt;/css/&amp;lt;?php echo $pageclass ?&amp;gt;.css&amp;quot; type=&amp;quot;text/css&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Could you write a Tips &amp;amp; Techinques article about this? ===&lt;br /&gt;
This looks very interesting. Do you think you could write a short Tips &amp;amp; Techniques article in the Wiki about this, with an example of how this would work in both of your scenarios? If so, that would be really helpful to a lot of people. Thanks. [[User:Dextercowley|Mark Dexter]] 20:48, 7 September 2009 (UTC)&lt;br /&gt;
:Will do. I&#039;ll try to have something up within a week or two. [[User:KavaXtreme|KavaXtreme]] 19:09, 8 September 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>KavaXtreme</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Talk:Page_Class_Suffix&amp;diff=15578</id>
		<title>Talk:Page Class Suffix</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Talk:Page_Class_Suffix&amp;diff=15578"/>
		<updated>2009-09-07T20:40:19Z</updated>

		<summary type="html">&lt;p&gt;KavaXtreme: /* Cascading Page Classes */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Apologies for the following rant, but this sounds like &amp;quot;Page class suffix&amp;quot; would be a good feature to use, where in fact &#039;&#039;&#039;it is not&#039;&#039;&#039;, because if used, it can quickly result in a very big stylesheet mess. &#039;&#039;&#039;It&#039;s the worst feature&#039;&#039;&#039; Joomla! (still) offers -- thanks to the obsolete, unintended backward compatibility with a dead browser named &amp;quot;Netscape Navigator 4&amp;quot; and unfortunately carried over from Mambo.&lt;br /&gt;
&lt;br /&gt;
I suspect that the implementation dates back to the old days when web designers still had to fight the buggy implementation of CSS in Netscape&#039;s browser, who required repetitive and additional selectors and rules whenever a page was disrupted by things like TABLEs, and at the same time being completely unaware of multiple classnames. &#039;&#039;This browser is dead for good!&#039;&#039; but eight years later, it&#039;s legacy is still with us in the core templates of Joomla! (I&#039;m going to write a {{jforum|wp|White Paper for 1.6}} so we can get rid of this, finally.)&lt;br /&gt;
&lt;br /&gt;
No graphical browser released in the last 7-8 years had required such a &#039;&#039;bad workaround&#039;&#039; in order to style individual pages. While the idea itself is nice, a proper implementation, facing reality of the 21st century, would apply the value of &#039;pageclass_sfx&#039; to the BODY element &#039;&#039;&#039;only&#039;&#039;&#039;, and nowhere else.&lt;br /&gt;
&lt;br /&gt;
Nobody with a good understanding of how Cascading Style Sheets &#039;&#039;really&#039;&#039; work would ever use this parameter as unfortunately demonstrated in the overrides of Beez and the way it&#039;s applied in the core &amp;quot;views&amp;quot;. The implementation is so unbelievable utterly &#039;&#039;wrong&#039;&#039;, it successfully destroys the [http://www.w3.org/TR/CSS21/cascade.html cascade and inheritance rules of CSS].&lt;br /&gt;
&lt;br /&gt;
Template Designers and Users should in fact be warned to &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;not use the Page class suffix at all&amp;lt;/span&amp;gt;&#039;&#039;&#039; in combination with any view template or override that contains the following statements all over the place:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class=&amp;quot;contentpaneopen&amp;lt;?php echo $this-&amp;gt;params-&amp;gt;get( &#039;pageclass_sfx&#039; ); ?&amp;gt;&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Read: get rid of the misbehaviour to concatene and thereby create &#039;&#039;brand new&#039;&#039; classnames using the &#039;&#039;&#039;best new feature&#039;&#039;&#039; of J! 1.5: template overrides.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Comment on the above:&lt;br /&gt;
I think that before throwing away the page suffix class feature, we have to find another solution for multi-lingual sites, which use RTL and LTR content in the same site.&lt;br /&gt;
It is impractical to change style direction on paragraph basis, and it does not influence headings.&lt;br /&gt;
Page suffix class enables (to limited extent) a RTL suffix, that will make all the content in some pages Right to left, within a Left to right site.&lt;br /&gt;
Template overriding  is not a good solution to the above issue.&lt;br /&gt;
&lt;br /&gt;
:Intersting argument. There&#039;s actually another (and better?) way to determine the writing direction in J!1.5 -- at least per article: the content language setting in the parameters. If J! wouldn&#039;t limit this to the languages installed but make this a &amp;quot;free&amp;quot; choice, this parameter can be used to determine (by language) whether the page should run RTL or LTR. Like adding the pageclass_sfx, adding the &#039;&#039;dir&#039;&#039; attribute nonetheless has to happen inside the templates. Per paragraph and per &amp;quot;word&amp;quot; tagging is still possible and necessary using HTML attributes; i.e. english text in a hebrew article or vice versa. Adding a parameter for RTL/LTR is a no-brainer as is &amp;quot;teaching&amp;quot; the templates to recognise it.&lt;br /&gt;
:I&#039;m not against pageclass_sfx in general; I think the way it is (still) implemented in the core templates is plain wrong and counter productive in regards of using &#039;&#039;&#039;Cascading&#039;&#039;&#039; Style Sheets. --&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[[User:CirTap|CirTap]] &amp;lt;small&amp;gt;([[User talk:CirTap|talk]] • [[Special:Contributions/CirTap|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/span&amp;gt; 05:45, 23 July 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
== You get a new CSS class if you use a leading space ==&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know if this changes your thinking or not, but if you enter the parameter with a leading space you get a new CSS class, which makes this much easier to work with. [[User:Dextercowley|Mark Dexter]] 21:01, 16 January 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Cascading Page Classes ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;suffix&amp;quot; is the outdated aspect of page class suffixes. The modern best practice approach would be to use page classes applied to the body tag, unleashing the cascading aspect of stylesheets. This means both leaner CSS and much greater flexibility in styling ANY element on the page. It also compliments and simplifies template overrides. This approach can already be applied in Joomla 1.5.x by adding the following code to the template&#039;s index.php file:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;?php&lt;br /&gt;
   $menus = &amp;amp;JSite::getMenu();&lt;br /&gt;
   $menu = $menus-&amp;gt;getActive();&lt;br /&gt;
   $pageclass = &amp;quot;&amp;quot;;&lt;br /&gt;
   if (is_object( $menu )) :&lt;br /&gt;
      $params = new JParameter( $menu-&amp;gt;params );&lt;br /&gt;
      $pageclass = $params-&amp;gt;get( &#039;pageclass_sfx&#039; );&lt;br /&gt;
   endif; &lt;br /&gt;
   ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;body id=&amp;quot;&amp;lt;?php echo $pageclass; ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(credit: [http://forum.joomla.org/viewtopic.php?p=1353495#p1353495 Page Class Suffix in template code])&lt;br /&gt;
&lt;br /&gt;
An alternative use of this approach would be to load a stylesheet unique to the page in question:&lt;br /&gt;
   &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;templates/&amp;lt;?php echo $this-&amp;gt;template ?&amp;gt;/css/&amp;lt;?php echo $pageclass ?&amp;gt;.css&amp;quot; type=&amp;quot;text/css&amp;quot;/&amp;gt;&lt;/div&gt;</summary>
		<author><name>KavaXtreme</name></author>
	</entry>
</feed>