Viewing 1 post (of 1 total)
  • Author
    Posts
  • 3apa3a Friend
    #146099

    Gentlemen,

    I am using Artisteer to make a Joomla template matching the rest of the site. There are provisions in Artisteer for two lines if text in the header for the site name and a slogan, however they are hard-coded into the template. I thought it would be nice to add controls for the template Parameters so that users could easily change those two lines, just like its done in JA Purity.

    So I am trying to borrow this solution from JA Purity and here what I have done so far.

    1. I replaced the original header code with Purity’s calls, now I have
    <div class=”art-Logo”>
    <?php
    $siteName = $tmpTools->sitename();
    $logoText = (trim($tmpTools->getParam(‘logoText’))==”) ? $config->sitename : $tmpTools->getParam(‘logoText’);
    $sloganText = (trim($tmpTools->getParam(‘sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $tmpTools->getParam(‘sloganText’); ?>
    <h1 id=”name-text” class=”art-Logo-name”>
    <a href=”<?php echo $baseUrl; ?>/” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a>
    </h1>
    <div id=”slogan-text” class=”art-Logo-text”><?php echo $sloganText;?></div>
    </div>

    2. I added the params lines in templateDetails.xml so I get the themple Parameters. This part works fine, no problems.
    <params>
    <param type=”spacer” default=”Template Logo” />
    <param name=”logoText” type=”text” default=”” size=”50″ label=”Logo text” description=”LOGO TEXT DESCRIPTION” />
    <param name=”sloganText” type=”text” default=”” size=”50″ label=”Slogan” description=”SLOGAN DESCRIPTION” />
    </params>

    But when I tried this template I was getting a PHP error, something about the call to an unknown function. Well, naturally, for there was no $tmpTools defined.

    OK, then I hook up two JA Purity’s PHP files to my template like this:
    3. I put ja_vars.php into the index.php with include_once and I put the ja_templatetools.php into the template directory.

    Now it all works just fine, but the Artisteer already makes its own functions.php file and I’d like to use just that file to support the template functionality and not two more .php files. Therefore I have a question for you:

    What code do I need to transfer from ja_vars.php or ja_templatetools.php into the functions.php file in order to support Logo text and Slogan functions for my template?

    Thank you in advance.

Viewing 1 post (of 1 total)

This topic contains 1 reply, has 1 voice, and was last updated by  3apa3a 15 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum