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)?
2 Answers 2
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.
-
@JulianM. Glad to hear that it helped. Happy Coding!Kul– Kul2016年11月13日 16:32:51 +00:00Commented Nov 13, 2016 at 16:32
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.
Explore related questions
See similar questions with these tags.