Skip to content
Grav 2.0 is officially stable. Read the announcement →

Muut Archive Legend

@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation

Badges

✏️ First Post 💬 Conversation Starter ❤️ Well Liked

Recent posts

  • Retrieve cookie using get_cookie() · 10 years ago

    Great thanks, I'll try asap :)

  • Retrieve cookie using get_cookie() · 10 years ago

    P.S. Grav 1.1 has solved many issues and it's nearly ready to be released so please use that.

  • Retrieve cookie using get_cookie() · 10 years ago

    I was testing on Grav 1.1. I missed the fact that the get_cookie Twig filter was introduced in Grav 1.1 (https://github.com/getgrav/grav/commit/0716f96d8dafd2fd65187cf0e7bdca76e8256349), so if you're

  • Retrieve cookie using get_cookie() · 10 years ago

    Hi, I'm posting here two screenshots, first is the cookie value and second is how I'm trying to get the value inside the twig template. Screen Shot 2016-06-29 at 19 Screen Shot 2016-06-29 at 19 Thi

  • Retrieve cookie using get_cookie() · 10 years ago

    As written in Twitter, to me it works, with a simple numeric cookie. Could it be that the implementation of get_cookie as linked above is filtering it? Post more information, what's the content of the

  • Retrieve cookie using get_cookie() · 10 years ago

    I just tried, it works to me. You can check the implementation of get_cookie in https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Twig/TwigExtension.php#L792-L795 to see why it's not

  • Retrieve cookie using get_cookie() · 10 years ago

    The cookie is set but I think the get_cookie() method isn't working as using dump()always returns null, even if the cookie is set.

  • Retrieve cookie using get_cookie() · 10 years ago

    You need to be sure that the cookie was actually set. Also, try using dump() in the twig to print stuff to the debug bar, helps a lot while debugging.

  • Retrieve cookie using get_cookie() · 10 years ago

    Hi, I'm trying to retrieve a cookie using this Grav Method: https://learn.getgrav.org/themes/twig-filters-functions#get-cookie I tried: {% set foo = get_cookie('MY_COOKIE') %} <p>var: {{foo}}&lt

  • Add a banner image to the antimatter default page type? · 10 years ago

    Wow, that actually worked, sort of: ==> cat default.html.twig {% extends 'partials/base.html.twig' %} {% block content %} {% set default_image = page.media.images|first.grayscale().contrast(20