Left side image

How to get the image appearing on left column. In userguide, not all the components are defined. JPG file attached.

5 answers

congtq 0.00 $tone June 23, 2010
Public

You can know the path of templates if turn on Template Path Hints.
1. Go to Admin -> Configuration
2. At Current Configuration Scope (on top lef) select Main Website
3. Select Developer on the left sidebar (at very end)
4. At Debug tab, set Template Path Hints is Yes

If success, you will see the image on left column is set in file frontend/base/default/template/callouts/left_col.phtml

#1
Profile photo of G T 0.00 $tone June 23, 2010
Public

I viewed the file.
"<div class="block block-banner">
<div class="block-content">
<?php if(strtolower(substr($this->getLinkUrl(),0,4))===’http’): ?>
<a href="<?php echo $this->getLinkUrl() ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
<?php elseif($this->getLinkUrl()): ?>
<a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
<?php endif; ?>
<img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />
<?php if($this->getLinkUrl()): ?>
</a>
<?php endif ?>
</div>
</div>"

Can you help me in understanding this, where the image link is defined.

#2
congtq 0.00 $tone June 25, 2010
Public

This is link

PHP Code:

<?php echo $this->getLinkUrl() ?>


and image

PHP Code:

<img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />


These codes

PHP Code:

<?php if(strtolower(substr($this->getLinkUrl(),0,4))==='http'): ?>

<a href="<?php echo $this->getLinkUrl() ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">

<?php elseif($this->getLinkUrl()): ?>

<a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">

<?php endif; ?>

<img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />

<?php if($this->getLinkUrl()): ?>

</a>

<?php endif ?>


mean that: If the link exists text "http" then the image will be placed a link.

#3

This question is now closed

Written By

Comments