Hi, I think I might be missing something obvious here, but is there any reason this wouldn’t work?
I have set a cookie on a previous page, with the name “redirect” and the value containing the current page url. This is for an “Age Verification” script. When the user hits a page it checks for the “Age” cookie, if it is not present the user is redirected to the “agechecker.php” form.
I’d like to pull the value of the redirect cookie, and use it in the action of the form, so the user gets returned to their previous entry page:
{exp:cookie_plus:get name="redirect" parse="inward"}
<form class="applyForm" id="lda-form" action="{cookie}">
{/exp:cookie_plus:get}
When I use the code above the result is a blank action, so either it’s not reading the cookie, or not displaying the value:
<form class="applyForm" id="lda-form" action="">
Thanks for your help!
Hi
Is it also possible to use multiple cookies in an entries tag? I wanted to use cookies to give some extra parameters, since dynamic parameters don’t work with pagination.
I want something like:
{exp:weblog:entries weblog="wl_agenda"
pagination="both"
show_future_entries="yes"
orderby="entry_date|title"
search:ag_search="{cookievalue1}"
limit="{cookievalue2}
sort="asc|asc"}
(Yes, I know there’s a thread on the forum about manually setting POST parameters, but that had some strange effects, especially with start_on and stop_before.)
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.