19

How can I get (current store) Base Url in CMS block/page in Magento 2? Actually, I am displaying category names in the footer by using static block. For that how can I give the Category Url links in admin static block?

Mohit Kumar Arora
10.2k7 gold badges29 silver badges57 bronze badges
asked Nov 19, 2016 at 13:44
1

3 Answers 3

56

You can add current store URL in static block.

{{store url=""}}

If you wanto add store url with category URL.

{{store url="category-url"}}
Rakesh Donga
5,4342 gold badges26 silver badges58 bronze badges
answered Nov 19, 2016 at 19:06
0
11

You can add store URL in static block:

<a href="{{store direct_url='identifier'}}">Your link</a>
answered Jan 30, 2019 at 10:43
2
  • 1
    This is working for Magento 2.4 and above versions Commented Nov 3, 2022 at 7:19
  • Thanks, happy to help @arun-sharma Commented Dec 19, 2024 at 12:58
0

{{store url="category-url"}}

answered Dec 23, 2021 at 7:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.