How to get Dynamic URLs in Magento PHTML

Published On November 14, 2012 | By Hans-Eirik Hanifl | Magento

Magento dynamic URLs in PHTML

The following are methods to get the Magento Base URL, Magento Skin URL, Magento Media URL, Magento Js URL, to get the route URL, use either of the following codes:

Returns: http://yourstore.com/index.php/

Magento Store Media URL

Returns: http://yourstore.com/media/

Magento Theme Skin URL

Returns: http://yourstore.com/skin/

Current Magento Store URL

Returns: http://yourstore.com/

Magento JS URL

Returns: http://www.yourstore.com/js

Like this Article? Share it!

About The Author

is a forward thinking e-commerce and marketing consultant. As an advocate for the free exchange of knowledge, he founded E-Commerce Gorilla as a place where like-minded individuals can ask questions and share their expertise on practical solutions in the area of e-commerce and marketing. He is the owner of TRM Marketing and an avid supporter of the open source community.

Leave a Reply