NEW ARTICLES  HOT ARTICLES  TOP RATED  ADD AN ARTICLE  UPDATE AN ARTICLE  GET RATED 
  HOME     MY ACCOUNT     POWER SEARCH     REGISTER     SUPPORT     SUGGEST CATEGORY  

Advanced Joomla Templating (pt2) PHP template techniques
4176 Computers > Programming Mar 1, 2007 Tristan Advanced Joomla Templating (pt2) PHP template techniques PHP template techniques

joomla provides some module related functions for template designers, mosCountModules & mosLoadModules being the most commonly used. A simple example would be a cell or div that only appears when there is a module in that position.

// if the count of modules published in the top position is greater than zero.


// load the top module position


// close the if action brackets


you can alter the output of the individual modules within a position using a style.

// with the default style of 0, modules displayed in a column (using a single table)



// with the style "1" you can display the modules horizontally (using tables within a row of cells in a wrapper table)


// with the style "-2" you can display the modules in a div tag


by using more complex if statements, you can dynamically control your layout with more precision. In this example, the table itself will only be displayed if there is a module in either the user7 or user8 position. The individual positions will only display their cell if they are populated. If both positions are populated then an extra spacer cell is also displayed.























alternately we could add required 'colspan' attributes to cells in higher rows to achieve a similar result.


colspan="2"


Grange Aquatics have been in business for over 20 years and have a dedicated team of staff on hand to share their expertise. Visit their website Pond Pumps.


Write a Review   Add to My Favorite   Refer it to Friend   Report Article  

Average Visitor Rating: 0.00 (out of 5)
Number of ratings: 0 Votes

Visitor Rating


Other links owned by this user
PHP template techniquesjoomla provides some module related functions for template designers, mosCountModules & mosLoadModules being the most commonly used. A simple example would be a cell or div that only appears when there is a module in that
Category:

Other links at Computers > Programming
Do you know how to stake your claim on the World Wide Web? How can you access all that potential, when you do not even understand where to get going? Isn't the internet an awesome way of sharing large amounts of info and to learn how to take a
Category:

The need --------------------------------------------------------------------------------Static websites are easy to design but hard to maintain. You have created a static website with desired content and you put in efforts to promote that site. As a
Category:

1. Don't use fancy web programming. Keep your website plain, simple and use basic technologies - Do not use Flash on your website,if a user doesn't have flash, they will not see that content, so if your navbar is flash, the visitor will not be
Category:

HTML is the programming language that has been instrumental in bringing about this revolution called 'Internet'. 'HTML' fascinates a lot of people. There are people who want to learn HTML in order to try their hands at developing a website on their own. F
Category:

Make Double Text readily available whenever you are working on any language in Visual Studio.
Category:




Site Sponsor
Directory Statistics

Articles: 68228
Categories: 501

Yahoo Entertainment
Valid XHTML 1.0 Transitional   Valid CSS