Get URL paths of your magento folder structure – Absolute URL Path
Mage::getBaseUrl() => Gets base url path e.g. http://my.website.com/
Mage::getBaseUrl(‘media’) => Gets MEDIA folder path e.g. http://my.website.com/media/
Mage::getBaseUrl(‘js’) => Gets JS folder path e.g. http://my.website.com/js/
Mage::getBaseUrl(‘skin’) => Gets SKIN folder path e.g. http://my.website.com/skin/
Get DIRECTORY paths (physical location of your folders on the server) – Relative URL Path
Mage::getBaseDir() => Gives you your Magento installation folder / root folder e.g. /home/kalpesh/workspace/magento
Mage::getBaseDir(‘app’) => Gives you your Magento’s APP directory file location e.g. /home/kalpesh/workspace/magento/app
Mage::getBaseDir(‘design’) => Gives you your Magento’s DESIGN directory file location e.g. /home/kalpesh/workspace/magento/design
Mage::getBaseDir(‘media’) => Gives MEDIA directory file path
Mage::getBaseDir(‘code’) => Gives CODE directory file path
Mage::getBaseDir(‘lib’) => Gives LIB directory file path
Get Current URL – whole URL path
Mage::helper(‘core/url’)->getCurrentUrl()
(A) The parameters of interest are Url:
1.url
2.direct_url
3._query
4._query_[name]
1. url :-
<a href="{{store url=""}}">Go to home page</a>
<a href="{{store url="contacts"}}">Contact Us</a>
2. direct_url :-
<a href="{{store direct_url="category/subcategory.html"}}">Our Latest Range</a>
3. _query and
<a href="{{store direct_url="category/subcategory.html" _query="a=param_a&b=param_b"}}">Our Latest Range</a>
4. _query_[name] :-
<a href="{{store direct_url="category/subcategory.html" _query_a="param_a" _query_b="param_b"}}">;Our Latest Range</a>
Example :-
This results in the same URL as the previous example:
http://yourstore.com/category/subcategory.html?a=param_a&b=param_b
Mage::getBaseUrl() => Gets base url path e.g. http://my.website.com/
Mage::getBaseUrl(‘media’) => Gets MEDIA folder path e.g. http://my.website.com/media/
Mage::getBaseUrl(‘js’) => Gets JS folder path e.g. http://my.website.com/js/
Mage::getBaseUrl(‘skin’) => Gets SKIN folder path e.g. http://my.website.com/skin/
Get DIRECTORY paths (physical location of your folders on the server) – Relative URL Path
Mage::getBaseDir() => Gives you your Magento installation folder / root folder e.g. /home/kalpesh/workspace/magento
Mage::getBaseDir(‘app’) => Gives you your Magento’s APP directory file location e.g. /home/kalpesh/workspace/magento/app
Mage::getBaseDir(‘design’) => Gives you your Magento’s DESIGN directory file location e.g. /home/kalpesh/workspace/magento/design
Mage::getBaseDir(‘media’) => Gives MEDIA directory file path
Mage::getBaseDir(‘code’) => Gives CODE directory file path
Mage::getBaseDir(‘lib’) => Gives LIB directory file path
Get Current URL – whole URL path
Mage::helper(‘core/url’)->getCurrentUrl()
(A) The parameters of interest are Url:
1.url
2.direct_url
3._query
4._query_[name]
1. url :-
<a href="{{store url=""}}">Go to home page</a>
<a href="{{store url="contacts"}}">Contact Us</a>
2. direct_url :-
<a href="{{store direct_url="category/subcategory.html"}}">Our Latest Range</a>
3. _query and
<a href="{{store direct_url="category/subcategory.html" _query="a=param_a&b=param_b"}}">Our Latest Range</a>
4. _query_[name] :-
<a href="{{store direct_url="category/subcategory.html" _query_a="param_a" _query_b="param_b"}}">;Our Latest Range</a>
Example :-
This results in the same URL as the previous example:
http://yourstore.com/category/subcategory.html?a=param_a&b=param_b
1 comment:
Howdy! Would you mind if I share your blog with my facebook
group? There's a lot of people that I think would really enjoy your content. Please let me know. Thanks
Here is my webpage: seksuolog warszawa
Post a Comment