Magento : Get Base Url , Skin Url , Media Url , Js Url , Store Url and Current Url

Magento : Get Base Url , Skin Url , Media Url , Js Url , Store Url and Current Url

Get Url in phtml files



1. Get Base Url :
Mage::getBaseUrl();

2. Get Skin Url :
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);

(a) Unsecure Skin Url :
$this->getSkinUrl('images/imagename.jpg');

(b) Secure Skin Url :
$this->getSkinUrl('images/imagename.gif', array('_secure'=>true));

3. Get Media Url :
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);

4. Get Js Url :
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);

5. Get Store Url :
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);

6. Get Current Url
Mage::helper('core/url')->getCurrentUrl();

Get Url in cms pages or static blocks

1. Get Base Url :
{{store url=""}}

2. Get Skin Url :
{{skin url='images/imagename.jpg'}}

3. Get Media Url :
{{media url='/imagename.jpg'}}

4. Get Store Url :
{{store url='mypage.html'}}

3,611 total views, 2 views today

Tags: coding, images, magento,
Loading Facebook Comments ...

38 Comments. Leave new

Relojes De Aviador
March 29, 2015 1:43 am

I’m gone to convey my little brother, that he should also pay a visit this web site on regular
basis to obtain updated from hottest reports.

Also visit my homepage; Relojes De Aviador

Reply
http://monitorreinigen.blogspot.com
March 29, 2015 8:10 pm

Greetings I am so happy I found your site, I really found you by
accident, while I was researching on Askjeeve for something else, Regardless I am here now and would just like to
say thank you for a incredible post and a all round thrilling blog (I also love the theme/design), I don’t have time to
read through it all at the moment but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read much more,
Please do keep up the fantastic b.

Reply

Hi! 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. Many thanks

Reply

Good day! I could have sworn I’ve been to this site before but after
going through some of the articles I realized it’s new to me.
Nonetheless, I’m definitely delighted I found it and
I’ll be book-marking it and checking back often!

Reply

Very energetic article, I enjoyed that a lot.
Will there be a part 2?

Reply

Hmm it seems like your site ate my first comment (it was extremely long) so I guess
I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog.

I as well am an aspiring blog blogger but I’m still new
to the whole thing. Do you have any tips and hints for first-time blog writers?
I’d certainly appreciate it.

Reply

Please let me know if you’re looking for a article author
for your blog. You have some really great posts and I believe I
would be a good asset. If you ever want to take some of the load off, I’d really like to write some content for your blog in exchange for a link back to
mine. Please shoot me an e-mail if interested.
Cheers!

Reply

Very soon this web site will be famous among all blogging and
site-building users, due to it’s pleasant articles

Reply

magnificent submit, very informative. I ponder why the
other experts of this sector do not understand this.
You should proceed your writing. I am sure, you
have a great readers’ base already!

Reply

An impressive share! I have just forwarded this onto a colleague who had been doing
a little homework on this. And he in fact bought me lunch simply because I discovered it for him…
lol. So let me reword this…. Thank YOU for
the meal!! But yeah, thanx for spending the time to talk about this issue here on your internet site.

Reply
Software & Games
April 5, 2015 4:42 pm

Hi my friend! Ι want to say thаt this post is awesome, nice
ԝritten and comе with аpproximately ɑll sіgnificant infos.
I աould likе tο see extra posts like tҺis .

Reply
media links tells
April 6, 2015 2:35 pm

Hey there would you mind letting me know which webhost you’re
utilizing? I’ve loaded your blog in 3 completely different web browsers and I
must say this blog loads a lot quicker then most. Can you recommend a good web hosting provider at a fair
price? Thank you, I appreciate it!

Reply
online payday loans
April 6, 2015 2:44 pm

Hello there! Quick question that’s entirely off topic. Do you know
how to make your site mobile friendly? My site looks weird when browsing
from my apple iphone. I’m trying to find a template or plugin that might be able to fix this problem.
If you have any recommendations, please share.
Appreciate it!

Reply
Freelancers
April 6, 2015 3:09 pm

Hi,

You Can Download templates from our website http://www.freelancingdesign.com/product-category/themes/
or you can contact us http://www.freelancingdesign.com/contact-us/ for more help.

Thanks!

Reply

Hey there! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new
to me. Anyways, I’m definitely glad I found it and I’ll be bookmarking and checking back frequently!

Reply
Redondo BeachRealtor
April 8, 2015 1:51 pm

Right away I am going to do my breakfast, later than having my breakfast coming over again to read additional news.

Reply
CarsonRealtor
April 9, 2015 7:46 pm

I am genuinely glad to read this webpage posts which
carries lots of useful information, thanks for providing such
statistics.

Reply
papers writing services
April 10, 2015 12:59 pm

I don’t know if it’s just me or if perhaps everyone else experiencing problems with your site.
It seems like some of the written text on your content are running off the screen. Can someone
else please provide feedback and let me know if this is happening to them too?
This could be a issue with my web browser because I’ve had this happen before.

Appreciate it

Reply
San PedroRealtor
April 10, 2015 2:21 pm

hi!,I like your writing very so much! percentage we communicate more about your article on AOL?
I require an expert in this house to solve my problem. May be that is you!
Having a look forward to look you.

Reply
rental mobil cikarang murah
April 11, 2015 12:05 am

This is very interesting, You’re a very skilled blogger.
I have joined your feed and look forward to seeking more
of your wonderful post. Also, I have shared your website in my social networks!

Reply

This post gives clear idea designed for the new viewers of
blogging, that in fact how to do blogging and
site-building.

Reply
Jual Geomembrane Indonesia Jakarta
April 14, 2015 12:26 pm

After checking out a few of the articles on your website,
I really appreciate your way of writing a blog.
I book-marked it to my bookmark website list and will be checking back soon. Take a look at my web site as
well and let me know your opinion.

Reply
covet fashion hack tool
April 17, 2015 2:25 am

Heya i am for the first time here. I found this board and
I find It truly useful & it helped me out a
lot. I hope to give something back and help others like you aided me.

Reply
free essays help
April 22, 2015 8:16 pm

Superb blog! Do you have any suggestions for aspiring writers?

I’m planning to start my own website soon but I’m a little lost on everything.
Would you recommend starting with a free platform like WordPress or go for a paid option? There are so many choices out there that
I’m totally confused .. Any suggestions? Thanks
a lot!

Reply

Hey! Do you know if they make any plugins to help with SEO?
I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results.
If you know of any please share. Cheers!

Reply
spy shop london
April 24, 2015 2:16 pm

I’m really enjoying the theme/design of your website.

Do you ever run into any internet browser compatibility issues?
A number of my blog readers have complained about my blog not working correctly in Explorer but looks great in Chrome.
Do you have any recommendations to help fix this issue?

Reply

For newest information you have to visit world wide web and on world-wide-web I found this web page as a best website for most
up-to-date updates.

Reply
business Model
April 29, 2015 4:24 am

Wow, that’s what I was looking for, what a data! present here at this webpage, thanks
admin of this web site.

Reply
deon_theodore
April 30, 2015 9:13 am

I don’t even know the way I ended up right here,
but I believed this post was great. I do not know who you’re but
certainly you are going to a well-known blogger when you are not
already. Cheers!

Reply
kelleethatcher
May 6, 2015 6:57 pm

Hello there! This is my first visit to your blog!
We are a team of volunteers and starting a new initiative in a community in the same niche.
Your blog provided us useful information to work on. You
have done a marvellous job!

Reply

Way cool! Some extremely valid points! I appreciate
you writing this post plus the rest of the site is extremely good.

Reply
britneygoulburn
May 8, 2015 2:08 pm

Hey there! I just wish to give you a huge thumbs up for the great info you have got here on this post.
I am coming back to your blog for more soon.

Reply
estelleblount
May 8, 2015 3:16 pm

hello!,I love your writing so much! share we be in contact more about your post on AOL?
I need an expert on this area to solve my problem. May be that’s
you! Taking a look forward to peer you.

Reply
vyriski rubai
May 14, 2015 3:11 pm

I think this is one of the most important information for me.
And i’m glad reading your article. But should remark on few
general things, The website style is great, the articles is really excellent : D.
Good job, cheers

Reply
rvtl skincare
May 16, 2015 3:16 pm

Hey! I realize this is somewhat off-topic however I had to
ask. Does managing a well-established website such as yours
take a lot of work? I’m brand new to writing a blog but I do write in my journal on a
daily basis. I’d like to start a blog so I can share my personal
experience and views online. Please let me know if you have any ideas or tips
for new aspiring blog owners. Appreciate it!

Reply
samarasticht
May 17, 2015 11:44 am

Write more, thats all I have to say. Literally, it seems as though you
relied on the video to make your point. You obviously know what youre talking about, why throw away your
intelligence on just posting videos to your blog when you could be giving
us something enlightening to read?

Reply
alkaline diet cancer
May 17, 2015 5:15 pm

I’ve learn a few good stuff here. Ϲertainly valսe bookmarking for revisiting.
ӏ wonder ɦow much attempt ʏou ƿut to create this kind oof excellent informative
website.

Reply
bandar judi online
May 18, 2015 4:54 am

I know this site provides quality depending posts and additional data, is there any other website which
offers these stuff in quality?

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter the captcha code *

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.

Coupon Code "HAPPY10" - Get Discounts upto 90% + 10% off on Purchase of themes/templates and Plugins