Dynamic header text in Artisteer generated Joomla templates


Author Message
Lance

Posted: 3/30/2009
Quote message 

Make header text dynamic in all Artisteer generated Joomla! templates.

Note:
This tutorial is located at http://artisteerhelp.com/ in this thread: http://tinyurl.com/dhtart
It contains images as well as code snippets for you to use.

Disclaimer:
This procedure involves making changes to files within Artisteer. Please remember to back up your original files and that if you decide to make these changes you do so at your own risk. Any updates or upgrades applied to the Artisteer program may overwrite these modifications.

What it does:
When you make these modifications, rather than Artisteer creating the static site name (Headline) and slogan (Slogan text) areas that have to be modified by editing the index.php file, all templates created in Artisteer will automatically get this information directly from Joomla. The best part about using this modification is that anyone using one of these templates can change the site name and slogan from within their Joomla administration panel.


First we want to open the following file folder: C:\Program Files\Artisteer 2\Library\Data\Templates\Joomla\Export\Glyphs

Look for this file: Logo.html

Open it with a text editor, you will see the following code:

<div class="logo">
<!-- BEGIN name -->
<h1 id="name-text" class="logo-name"><a href="<?php echo $this->baseurl ?>/">{Name}</a></h1>
<!-- END name -->
<!-- BEGIN slogan -->
<div id="slogan-text" class="logo-text">{Text}</div>
<!-- END slogan -->
</div>

We want to replace the following code:
Replace {Name} with <?php echo $mainframe->getCfg('sitename') ;?>
Replace {Text} with <?php echo $mainframe->getCfg('MetaDesc') ;?>


This is how your code should look when completed:

<div class="logo">
<!-- BEGIN name -->
<h1 id="name-text" class="logo-name"><a href="<?php echo $this->baseurl ?>/"><?php echo $mainframe->getCfg('sitename') ;?></a></h1>
<!-- END name -->
<!-- BEGIN slogan -->
<div id="slogan-text" class="logo-text"><?php echo $mainframe->getCfg('MetaDesc') ;?></div>
<!-- END slogan -->
</div>

Should you decide that you don't want to modify any files within Artisteer you can use the two pieces of replacement code within your index.php file to accomplish the same thing after the template has been created.
 
Mas

Posted: 8/24/2011
Quote message 

Hmm.. nice 1, but this wont work for latest version 3.0 above..
anybody knows the correct code to work with latest version?
 
Bill

Posted: 1/5/2012
Quote message 

I too am looking for this solution on our website. If anyone has the solution for this please let us know ASAP. unfortunately this no longer works

b
http://www.lifeinsurancequotes.com.au/