Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Lightbox and links…
 
zzbomb
Jr. Member
 
Total Posts:  7
Joined:  2008-06-06
 

I want to place a link on every page to open a lightbox image.

I edited links.phtml

This is my links.phtml code i am using..

<?php
/**
 * @see Mage_Page_Block_Template_Links
 */
?>
<?php $_links 
$this->getLinks(); ?>
<?php 
if(count($_links)>0): ?>
        
<ul<?php if($this->getName()): ?>):?> id="<?php echo $this->getName() ?>"<?php endif;?> class="top-links">   <a href="images/../lightbox/image-1.jpg" rel="lightbox" title="This is a caption">This is the link that shows</a>
            
<?php foreach($_links as $_link): ?>
                
<li <?php if($_link->getIsFirst()): ?> class="first"<?php elseif($_link->getIsLast()): ?> class="last"<?php endif; ?><?php echo $_link->getLiParams() ?>><?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?><?php echo $_link->getAfterText() ?></a></li>
            
<?php endforeach; ?>
        
</ul>
<?php endif; ?>

It works this way but only on the home page… What do i need to do to make it work on the other pages.?

 
Magento Community Magento Community
Magento Community
Magento Community
 
zzbomb
Jr. Member
 
Total Posts:  7
Joined:  2008-06-06
 

Any suggestions please?

 
Magento Community Magento Community
Magento Community
Magento Community
 
zzbomb
Jr. Member
 
Total Posts:  7
Joined:  2008-06-06
 

SOMEONE PLEASE HELP ME!

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

Hi balinic and zzbomb, there have had lengthy discussion on lightbox implementation on prototype and jQuery’s versions, including a Wiki article.

For a new comer, it does help you greatly to use search function, browser the Wiki and Knowledge Base to find your answer. Magento is new, most people including me are still learning, some questions never get answered likely because nobody knows the answers yet, or somebody who knows the answers never get a chance to read those post (for example, this one was posted one month ago but I only seen it today because of your reply that brought it to the top).

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top