0

I'm using {{store url=""}} to build the URL for a CMS block. The block is later loaded within the HEAD tag to include a rel="stylesheet" link pointing to a CSS file.

My problem is that the store directive used in this context is giving the unsecure address (http instead of https).

How do I get the rel="stylesheet" link to point to the proper URL (in this case, the secure version)?

asked Nov 13, 2016 at 14:01
0

2 Answers 2

1

You can pass parameter : _secure=1 And for force secure url _force_secure=1

See example :

<a href="{{store direct_url="" _secure=1}}">Link title</a>

And for Force Secure Url :

<a href="{{store direct_url="" _force_secure=1}}">Link title</a>

Hope this help.

answered Nov 13, 2016 at 14:53
1
  • @JulianM. Glad to hear that it helped. Happy Coding! Commented Nov 13, 2016 at 16:32
0

You should also be able to use

<a href="{{config path='web/secure/base_url'}}">Link title</a>

Might have to add web/secure/base_url to allowed variables at System > Permissions > Variables first.

answered Nov 13, 2016 at 16:03

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.