Page Class Suffix
From Joomla! Documentation
Revision as of 16:56, 22 July 2008 by Gen
Apologies for the following rant, but this sounds like "Page class suffix" would be a good feature to use, where in fact it is not, because if used, it can quickly result in a very big stylesheet mess. It's the worst feature Joomla! (still) offers -- thanks to the obsolete, unintended backward compatibility with a dead browser named "Netscape Navigator 4" and unfortunately carried over from Mambo.
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'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. This browser is dead for good! but eight years later, it's legacy is still with us in the core templates of Joomla! (I'm going to write a White Paper for 1.6 forum so we can get rid of this, finally.)
No graphical browser released in the last 7-8 years had required such a bad workaround 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 'pageclass_sfx' to the BODY element only, and nowhere else.
Nobody with a good understanding of how Cascading Style Sheets really work would ever use this parameter as unfortunately demonstrated in the overrides of Beez and the way it's applied in the core "views". The implementation is so unbelievable utterly wrong, it successfully destroys the cascade and inheritance rules of CSS.
Template Designers and Users should in fact be warned to not use the Page class suffix at all in combination with any view template or override that contains the following statements all over the place:
class="contentpaneopen<?php echo $this->params->get( 'pageclass_sfx' ); ?>"
Read: get rid of the misbehaviour to concatene and thereby create brand new classnames using the best new feature of J! 1.5: template overrides.
Comment on the above: 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. It is impractical to change style direction on paragraph basis, and it does not influence headings. 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. Template overriding is not a good solution to the above issue.