Forked from freakdesign/new-content-for-header.liquid
Created
October 31, 2016 20:14
-
-
Save seedcms/8b0dd865c721fe48aea4555c75b4ddeb to your computer and use it in GitHub Desktop.
Detect if an admin is logged into Shopify using liquid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Simple method for detecting an Admin in Shopify using liquid. | |
Quick code by jason at freakdesign.com.au | |
Related Blog post: http://freakdesign.com.au/blogs/news/34154561 | |
--> | |
{% capture CFH %}{{ content_for_header }}{% endcapture %}{{ CFH }} | |
{% if CFH contains 'admin_bar_iframe' %} | |
{% assign isAdmin = true %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment