read-cookie
Summary
| Parameter
|
Description
|
Default
|
| name |
The name of the cookie you want to read. |
None |
Examples
Tag expansion example
[read-cookie MV_SESSION_ID]
|
|
abc123
|
Perl example
$Tag->read_cookie({
name => $name,
});
|
or similarly with positional parameters:
|
$Tag->read_cookie($name);
|
Description
This tag returns value of the named cookie,
or returns nothing at all if the named cookie does not exist.
If you call this tag with Perl,
and use the "positional parameters" syntax shown in the examples,
above,
then you may pass a second (cookie string) parameter,
as follows:
|
$Tag->read_cookie('MV_SESSION_ID', 'MV_SESSION_ID=abc123:127.0.0.1');
|
If you use this syntax then the cookie's value will only be returned if
the specified string
("abc123:127.0.0.1", in this case)
is found within the named cookie.
If the specified string is not found within the named cookie's value,
or the cookie itself is not found,
then nothing will be returned.
Parameters
name
The name of the cookie you want to read.
If the named cookie cannot be found then nothing will be returned.