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

getSkinUrl issue
 
Pipuks
Jr. Member
 
Total Posts:  12
Joined:  2008-09-03
 

I’m having trouble with getting results I expect to get with $this->getSkinUrl()

I tried to change Store View switch from drop down menu to flags. Used the code I found here in forums written by Jorg:

<?php if (count($this->getStores()) > 1) : ?>
<div class="language-switcher">
    
<?php foreach ($this->getStores() as $_lang) : ?>
    
<a href="<?php echo $_lang->getCurrentUrl(); ?>"><img src="<?php echo $this->getSkinUrl('images/flag_' . $this->htmlEscape($_lang->getCode()) . '.gif'); ?>" width="16" height="11"
alt="<?php echo $this->htmlEscape($_lang->getName()); ?>" /></a>
    
<?php endforeach; ?>
</div>
<?php endif; ?>

What I get as image URL is always “[..]default/default[..]” while it should be “[..]default/mytheme[..]”.

I’ve changed everything to “mytheme” in Configuration, but I’m still stuck. I checked <head></head> part of the output HTML, and it contains both - icon file is from “default/default” while some CSS files are from “default/mytheme”.

If that helps - I’m modifying Blank theme.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pixxa
Sr. Member
 
Total Posts:  275
Joined:  2008-10-23
 

Bump!

Want to know also..

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ben Marks
Moderator
 
Avatar
Total Posts:  452
Joined:  2008-10-09
Charleston, SC
 

Can you (both) confirm that the filename resulting from “flag_’ . $this->htmlEscape($_lang->getCode()) . ‘.gif’” is in fact present in your theme images folder and is accessible?  Mage checks filenames passed via getSkinUrl() (the first param) and returns the default package + default theme path if the file is not found.

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