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)?

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.

  • @JulianM. Glad to hear that it helped. Happy Coding! – Kul Nov 13 '16 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.