2

Bear with me.

Shortly changing a site to run over https vs http - the issue is though that we need to maintain the Facebook open graph share data.

Facebook makes distinction between https and http. The way to maintain this is just to add <meta property="og:url" content="//www.myurl.com/segment/segment" />

Is there a variable I can access that would output the current URL without the protocol?

2

You could build it up using a couple of the request variables:

{{ craft.request.serverName ~'/'~ craft.request.getSegments | join('/') }}
  • Dang, you beat me to answering my own question :D – Steven Grant Mar 22 '16 at 16:08
  • Haha, sorry. I'm not normally quick enough to get a right answer in :) – Steve Holland Mar 22 '16 at 16:10
  • That'll teach me to post and then start speaking to a colleague ;) – Steven Grant Mar 22 '16 at 16:10

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.