How to add alt attribute description in the logo

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Aug 12, 2014 2:28 pm
Reply with quote
Report this post
Hello,

They could help to place a description with "alt" attribute to place myself above the logo template. That file must be modified to add this.

Attached is a picture with what I get. Thanks for your help.
User avatar
Junior Boarder

teitbite
Wed Aug 13, 2014 12:28 pm
Reply with quote
Report this post
Hi

You can add alt attribute in /layout/blocks/logo.php
User avatar
Moderator

GK User
Thu Aug 14, 2014 10:51 am
Reply with quote
Report this post
Dear TEITBITE,

Good morning, thank for your reply, but excuse me could you tell me specifically which line of the code file and logo.php code should be placed.

Code: Select all
$logo_image = $this->API->get('logo_image', '');

if(($logo_image == '') || ($this->API->get('logo_type', '') == 'css')) {
     $logo_image = $this->API->URLtemplate() . '/images/logo.png';
} else {
     $logo_image = $this->API->URLbase() . $logo_image;
}

$logo_text = $this->API->get('logo_text', '');
$logo_slogan = $this->API->get('logo_slogan', '');

?>

<?php if ($this->API->get('logo_type', 'image')!=='none'): ?>
     <?php if($this->API->get('logo_type', 'image') == 'css') : ?>
     <a href="<?php echo JURI::root(); ?>" id="gkLogo" class="cssLogo"><?php echo $this->API->get('logo_text', ''); ?></a>
     <?php elseif($this->API->get('logo_type', 'image')=='text') : ?>
     <a href="<?php echo JURI::root(); ?>" id="gkLogo" class="text">
      <span><?php echo $this->API->get('logo_text', ''); ?></span>
        <small class="gkLogoSlogan"><?php echo $this->API->get('logo_slogan', ''); ?></small>
     </a>
     <?php elseif($this->API->get('logo_type', 'image')=='image') : ?>
     <a href="<?php echo JURI::root(); ?>" id="gkLogo">
        <img src="<?php echo $logo_image; ?>" alt="<?php echo $this->API->getPageName(); ?>" />
     </a>
     <?php endif; ?>
<?php endif; ?>



Thank for your support.
User avatar
Junior Boarder

teitbite
Thu Aug 14, 2014 6:12 pm
Reply with quote
Report this post
Hi

Line 28 whihc should looks like this:

Code: Select all
        <img src="<?php echo $logo_image; ?>" alt="<?php echo $this->API->getPageName(); ?>" />


as You can see there is an alt value from site's name there, so replace it with the one You want.
User avatar
Moderator

GK User
Mon Aug 18, 2014 12:24 pm
Reply with quote
Report this post
Dear TEITBITE,

Good morning, thank for your reply and support.
Sorry for the inconvenience and my ignorance, but I tradado placing the title into the code in different parts of the line and do not get the text to appear when you hover your mouse over the logo of the website.

Could you post a concrete example with the line of code with the word "Gavick" as alt attribute.

Many thank for the support and you patience.
User avatar
Junior Boarder

teitbite
Tue Aug 19, 2014 2:34 pm
Reply with quote
Report this post
Hi

Of course. Here is how this line should looks like:

Code: Select all
<img src="<?php echo $logo_image; ?>" alt="Gavick" />


But as I said it will only work if logo image type was selected in template settings.
User avatar
Moderator

GK User
Thu Aug 21, 2014 11:45 am
Reply with quote
Report this post
Hello Dear,

Thank for your support, i tried to put the code like you said and I still see the description ALT "Gavick" when I stand above the logo.

I have also tried placing this attribute:

Code: Select all
alt="Gavick"


the other options on the view type text from css and has not worked for me.

:(
User avatar
Junior Boarder

teitbite
Fri Aug 22, 2014 7:15 pm
Reply with quote
Report this post
Hi

Ok. I'm a little bit confused. Wasn't the idea to have an "alt" attribute added because this name should appear when mouse cursor is over the image ? Please try to explain one more time what do you want me to do and send me FTP access, so I'll make it.
User avatar
Moderator

GK User
Mon Aug 25, 2014 8:54 am
Reply with quote
Report this post
Dear Teitbite,

Thank for your reply and support.
Unfortunately now I can not provide access to FTP, since I am working on localhost.

If you access the following link, you will see what I require to do with the logo of the CloudHost template.

Code: Select all
http://www.globalavl.com/


I hope I can help without having to access the FTP.
User avatar
Junior Boarder

teitbite
Tue Aug 26, 2014 1:20 pm
Reply with quote
Report this post
Hi

Thanks for that link. What You are trying to do You can do by using title="" attribute, not alt="". Sorry I had not understood You.

Approach would be the same, You just need to use a different code in this line in /layout/blocks/logo.php:

Code: Select all
<img src="<?php echo $logo_image; ?>" title="Gavick" />
User avatar
Moderator

GK User
Mon Sep 01, 2014 1:14 pm
Reply with quote
Report this post
Dear Teitbite,

Good afternoon, thank you very much for responding and giving me support with this case. With this latest code if it works. Now I understand how to put the code inside the file.


Code: Select all
<?php if ($this->API->get('logo_type', 'image')!=='none'): ?>
     <?php if($this->API->get('logo_type', 'image') == 'css') : ?>
     <a href="<?php echo JURI::root(); ?>" id="gkLogo" class="cssLogo" title="Teitbite THANKS FOR THE SUPPORT"><?php echo $this->API->get('logo_text', ''); ?></a>
     <?php elseif($this->API->get('logo_type', 'image')=='text') : ?>
     <a href="<?php echo JURI::root(); ?>" id="gkLogo" class="text" title="Teitbite THANKS FOR THE SUPPORT">
      <span><?php echo $this->API->get('logo_text', ''); ?></span>
        <small class="gkLogoSlogan"><?php echo $this->API->get('logo_slogan', ''); ?></small>
     </a>
     <?php elseif($this->API->get('logo_type', 'image')=='image') : ?>
     <a href="<?php echo JURI::root(); ?>" id="gkLogo">
        <img src="<?php echo $logo_image; ?>" title="Teitbite THANKS FOR THE SUPPORT" />
     </a>
     <?php endif; ?>
<?php endif; ?>


Thank you for your attention and support.

Have a nice day.
User avatar
Junior Boarder

teitbite
Mon Sep 01, 2014 7:26 pm
Reply with quote
Report this post
Hi

No problem. Glad I could help :)
User avatar
Moderator


cron