Overwriting persistent parameter 24/04/2015

Problem Let’s have persistent parameter in presenter with some default value. The value here is NULL. /** @persistent int */ public $page; This parameter is now always transferred between redirects. But we want to disable that for some links. Here is how. Solution Create link and pass that parameters’ default value as an attribute. <a href="{link someAction, page => NULL}">some text</a> <!-- or --> <a n:href="someAction, page => NULL">some text</a>

Problem

Let’s have persistent parameter in presenter with some default value. The value here is NULL.

/** @persistent int */
public $page;

This parameter is now always transferred between redirects. But we want to disable that for some links. Here is how.

Solution

Create link and pass that parameters’ default value as an attribute.

<a href="{link someAction, page => NULL}">some text</a>
<!-- or -->
<a n:href="someAction, page => NULL">some text</a>