--=REKLAMA=--

Dyskusja

Stosowanie przyrostków klas w Joomla! 1.5

Z Joomla!WikiPL

Page Class Suffix is a parameter in Joomla! content Menu Items. It is set in the Menu Item: [Edit] screen under the "Parameters (Advanced)" section. This will cause Joomla! to either add a new CSS class or modify the existing CSS class for elements in this specific Menu Item layout.

When Joomla! generates a page, it automatically creates pre-defined CSS classes to allow styling of the page. For example, a page might have the element
<div class="componentheading">
To create a new class, enter the parameter with a leading space. For example, entering a space plus "myNewClass" will create a new CSS class called "myNewClass" and it will be inserted as a class for elements in that Menu Item. In this case the example above will be changed to
<div class="componentheading myNewClass">
To change the name of the existing class, enter in the parameter without a leading space. For example, entering "_mySuffix" (no leading space) will cause the HTML to changed to
<div class="componentheading_mySuffix">

Generally, it is recommended to use a leading space to create a new class. This way, CSS styling for this component that uses the standard class names will continue to work. You can use the new class name to add any desired styling to the component without needing to re-create all of the existing CSS code. Note that, if you create a new class name, make sure it has a unique name and doesn't conflict with any existing class names.



Module Class Suffix is a parameter in Joomla! modules. It is set Module: [Edit] screen under Advanced Parameters. Setting this parameter causes Joomla! to either add a new CSS class or modify the existing CSS class for the "div" element for this specific module.

When Joomla! generates a module, it automatically create a CSS class called "moduletable" to allow styling of the module -- for example,
<div class="moduletable">
To create a new class, enter the parameter with a leading space. For example, entering a space plus "myNewClass" will create a new CSS class called "myNewClass". The HTML will be changed to
<div class="moduletable myNewClass">
To change the name of the existing class, enter in the parameter without a leading space. For example, entering "_mySuffix" (no leading space) will cause the HTML to changed to
<div class="moduletable_mySuffix">

Generally, it is recommended to use a leading space to create a new class. This way, CSS styling for this module that uses the standard class names will continue to work. You can use the new class name to add any desired styling to the module without needing to re-create all of the existing CSS code. Note that, if you create a new class name, make sure it has a unique name and doesn't conflict with any existing class names.

Zamieniłem przyrostek "mojBlogPrzyrostek" z powrotem na "myBlogClass", ponieważ było to niespójne (w części opisu był "mojBlogPrzyrostek", a dalej, w odnoszącym się do tego samego już "myBlogClass"). Ta niespójność mogła wprowadzać w błąd. Tym bardziej, że grafiki są jeszcze w języku angielskim, na których występuje angielska "myBlogClass". Dlatego proponuję zamienić na "mojBlogPrzyrostek" po zamianie grafik w języku polskim.