Magento Forum

   
{{store url}} now has 2 index in the url
 
Anjanesh
Sr. Member
 
Avatar
Total Posts:  136
Joined:  2008-03-15
Mumbai, India
 

Hi

I upgraded Magento on my development PC from 1.0.19700 to ver 1.1.6.
In my CMS pages, I have
<a href="{{store url="about"}}" >
It used to work as http://192.168.1.3/magento/about/
But now its http://192.168.1.3/magento/about/index/index/ and thus not working.

{{store url}} got changed ?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
prosurf
Jr. Member
 
Total Posts:  11
Joined:  2007-09-06
 

Try this--

<a href="about">About</a>

HTH

MG

 
Magento Community Magento Community
Magento Community
Magento Community
 
alex.bsc
Guru
 
Total Posts:  340
Joined:  2008-06-06
 

please take a look at this bug and add to it if you are affected;

http://www.magentocommerce.com/bug-tracking/issue/?issue=4160

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-05-06
 

This is my way. It works from CMS pages:

<a href="{{store url=""}}about-us"></a>

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-05-06
 

If you want to call something from your skin:

<img src="{{skin url=""}}images/image.jpg" width="” height="” alt="” />

 
Magento Community Magento Community
Magento Community
Magento Community
 
mayerwin
Sr. Member
 
Avatar
Total Posts:  182
Joined:  2008-01-15
France
 

It’s a pity that this is not resolved yet.

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-05-06
 

Ok now I understand the question. Sorry, I don´t know the solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alex.bsc
Guru
 
Total Posts:  340
Joined:  2008-06-06
 

great, they closed the bug with ‘we can not reproduce this issue’.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Anjanesh
Sr. Member
 
Avatar
Total Posts:  136
Joined:  2008-03-15
Mumbai, India
 

Seem to have got this working on 1.1.8

 
Magento Community Magento Community
Magento Community
Magento Community
 
alex.bsc
Guru
 
Total Posts:  340
Joined:  2008-06-06
 

it is not fixed in 1.1.8

 
Magento Community Magento Community
Magento Community
Magento Community
 
TemplatesMaster
Guru
 
Avatar
Total Posts:  304
Joined:  2008-04-01
Switzerland
 
doctorlogos - 26 November 2008 01:38 PM

This is my way. It works from CMS pages:

<a href="{{store url=""}}about-us"></a>

It was fixed in 1.2.

<a href="{{store url=""}}about-us"></a>

This is not right way to generate url. If for some reason you will have session or other variable in your url all your links will be broken.

<a href="{{store url="about-us"}}"></a>

This is right way.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alex.bsc
Guru
 
Total Posts:  340
Joined:  2008-06-06
 

does it work in left.php and right.php??

 
Magento Community Magento Community
Magento Community
Magento Community
 
alex.bsc
Guru
 
Total Posts:  340
Joined:  2008-06-06
 

Got it!  If you want to get the store path when editing e.g. left.php or right.php or any other file in magento, especially when you have ‘add store to url’ in the config, do this:

Add this to your code;

<?php
$storeCode 
Mage::app()->getStore()->getCode();
?>

This gets the store code.  Then, use as such;

<?php echo "<a href=\"/" . $storeCode . "/customer-service\">" ?>

This produces a link to your customer service page, bit it could be anything!
In essence you are writing out a link relative to the web server root, then adding the store name, then the link you’d like.

If you do not have ‘add store code to url’ enabled, simply use;

<a href="/customer-service">blah</a>

i.e. put a slash before the start of your link. This makes it relative to the root of the url.

Gifts welcome! wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
FranzderFranke
Sr. Member
 
Total Posts:  81
Joined:  2009-04-16
 

Hi, I think a “href="{{store url="agb"}}">AGB" for example make so much duplicate Content. If you have a Mulitstore with 100 Storeviews you get 100 Duplicate Content.

Is there a way that it only generate one site: www.mysite.de/customer-service/

and not

www.mysite.de/site1/customer-service/
www.mysite.de/site2/customer-service/
www.mysite.de/site3/customer-service/
....

 
Magento Community Magento Community
Magento Community
Magento Community
 
Halt
Jr. Member
 
Total Posts:  2
Joined:  2013-10-17
 


This was the Way we can use in the Magento Admin pages and Magent Admin static blocks, with your regarding pages well.
<a href="{{store url=""}}about-us">About Us</a>
<a href="{{store url=""}}help">Help</a>
<a href="{{store url=""}}videos">Videos</a>

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