This is a step-by-step howto based on "Flooble's Expandable Content script".
It is mainly a copy & past of the resulting script to show you how you are able to use such a code for your own moslate.
(This means that I did not create any of the used JavaScript)
However, this is the logic-version of the previous howto. The benefit of this approach is a cleaner code because no php is used. (you will need moslate & logic 0.5+)
Howto (expandable-content2) - using logic |
part 1 - create/choose your categoryTo create any moslate you have to have a category available... if you don't have any you may create one by choosing (Menu): Components -> Moslates -> Moslate Categories There you can use the "New" button (this is actually a list provided by the Joomla/Mambo administration core). part 2 - create moslate1) First you may navigate to the main list by choosing (Menu): Components -> Moslates -> Manage Moslates 2) Click on "New" 3) Choose the category you might just created 4) Enter a name, e.g. "expandable-content" 5) Enter the template-code:
7) Set "Mode" to "Ignore Parameters" (we will access variables using EL) 8) Set "Logic Scope" to "Yes" (this will prevent overwriting variables with the same name) 8) Set "Logic Variables" to "Yes" (this will make parameters available within EL) part 3 - template-code explained (skip this part if you don't care)
The resulting counter (starting at 0) we will use for the id of each box and to determine whether we have to include a static header. By using requestScope it will be a global variable which can be used as a counter throughout the page.
part 4 - create/edit your contentEnter for example:
|