test
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • fowler21 Friend
    #135294

    Hi.

    I was wondering if it’s possible to change the Logo image ALT text from sitename to site title?

    I can see that it uses this code to generate the image ALT text on the logo.

    <?php
    $siteName = $tmpTools->sitename();
    if ($tmpTools->getParam('logoType')=='image') { ?>
    <h1 class="logo">
    <a href="index.html" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>
    </h1>

    I would like it to use site title instead. So that the ALT text is different on every page.

    Can someone help me out here?

    Thank you.

    Sherlock Friend
    #279103

    Hi !
    you can use following code to get page title :


    $params = &$mainframe->getParams();
    $page_title = $params->get( 'page_title' );

    simondooner Friend
    #279686

    Hi

    I’m using JA Helio on 1.5 and matching the main logo ALT with the page title would be a useful SEO mod.

    I altered my index.php to the following which seems to work for everything except Category classes? Is there a way of including Category titles also?


    <?php
    $params = &$mainframe->getParams();
    $page_title = $params->get( 'page_title' );
    $siteName = $tmpTools->sitename();
    if ($tmpTools->getParam('logoType')=='image') { ?>
    <h1 class="logo">
    <a href="index.php" title="<?php echo $page_title; ?>"><span><?php echo $page_title; ?></span></a>
    </h1>
    <?php } else {
    $logoText = (trim($tmpTools->getParam('logoText'))=='') ? $config->page_title : $tmpTools->getParam('logoText');
    $sloganText = (trim($tmpTools->getParam('sloganText'))=='') ? JText::_('SITE SLOGAN') : $tmpTools->getParam('sloganText'); ?>
    <h1 class="logo-text">
    <a href="index.php" title="<?php echo $page_title; ?>"><span><?php echo $logoText; ?></span></a>
    </h1>

    Thanks

    Simon

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 3 voices, and was last updated by  simondooner 16 years, 1 month ago.

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