Main Menu
| Home |
| Joomla Themes News |
| Joomla Web Design Tips |
| Joomla News |
| Joomla Templates |
| Submit News |
| Web Links |
| Advertising |
| SiteMap |
| Contact Us |
Latest Site News
- New Joomla Templates From Joomladesigns
- IceTheme IT Together Theme August 2008
- Perihelion Template From Rockettheme
- PowerKite From Theme Joomla
- Template Plazza eShop Plazza Theme
- Creajoomla CJ Sport Theme
- Joomla.org Gets A New Design
- Joomla! 1.5.6 Upgrade Now
- CSSArts CSS Gallery
- Joomla! 1.5.4 Available For Download
- Joomla Showcase Web design Gallery
- Pixelsparadise Earth And Grass Theme
- Veero Studio Giuseppe Template
- Fusion Lite From Theme Joomla
- eTensity - Shape 5 Joomla Club Template May 08
- Color Fusion From ThemeJoomla
- Pixelsparadise Coffee with Milk Template
- Joomladesigns New Joomla Templates Available
- Yootheme Nu Template May 2008
- Rocketthme Catalyst Joomla Template
| Extracting the Site Name |
|
Every wanted to extract the Joomla site name from the global configuration.php file so it gets displayed in your template. Well this is how you can do it. 1) Open the template index.php file in notepad.exe or an editor of your choice. 2) Add the following line of code in your template index.php file where you would like the title to appear. <div class="sitename"><h1><?php echo $mosConfig_sitename; ?></h1> 3) Basically the above code is referencing a div class plus applying the H1 tag to the site title. The <?php echo $mosConfig_sitename; ?> The <?php echo $mosConfig_sitename; ?> is used to automatically extract the site name from the global configuration file and apply it your template index.php file. 4) Now we need to apply a style to the Div class site name plus the H1 tags so you can control the way your site title will look. 5) Open the template_css.css file using note pad and add the following code. .sitename { color: #FFF; padding-top: 20px; padding-left: 50px; } h1 { 6) The above css code will control the position of the div class called <div class="sitename">and apply a style to the H1 tag. 7) So the style applied to the .sitename is FFF ( white color ) and then you are positioning the title with padding-top :20px and padding-left:50px. 8) With the H1 tag to are applying a font style of Arial, Verdana, Helvetica, sans-serif; and font size of 17px plus adding padding-left: 5px; Your Joomla site name will now be automatically displayed in your template. |
| < Prev | Next > |
|---|



