When rewriting result values to make them appear as a link, you may need to access the current query string parameters (mostly the page one). For instance:
view/path/[nid]?page=%page
would be replaced to
view/path/16?page=1
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | views-1442960-3.patch | 1.49 KB | plach |
| #1 | views-1442960-1.patch | 1.46 KB | plach |
Comments
Comment #1
plachThe attached patch implements the behavior described in the OP and clears the query string when no matching token replacement values are found, for instance:
is replaced to
if the page query string parameter is empty.
Comment #2
tim.plunkettI think we should avoid using single letter variables.
That said, this seems like an worthwhile patch.
Comment #3
plachAgreed, we cannot use
$valuehere, since it is already defined.Comment #5
tim.plunkett#3: views-1442960-3.patch queued for re-testing.
Comment #6
plach@tim.plunkett:
Any other concern?
Comment #7
tim.plunkettNope.
Comment #8
plach:)
Comment #9
dawehnerCool, that's a nice feature! Just committed the patch to 7.x-3.x. Thansk!
Comment #10
mxtHi all,
I've setted up a view with an exposed filter to select the mime type of a file field (i'm using the media module).
The exposed filter select option works very well and shows the following options:
Now I need that the "No results behavior" -> "Global: text area" of my view shows the following text in case of no results:
"No results for media of type %type"
Where %type would be the token replacement for the value of the "type" param in the querystring (/gallery?type=audio).
I've tried to apply the patch provided in #3 but I can't see any %type token in the replacement patterns area for "No results behavior" -> "Global: text area"
I'm missing something?
Thank you very much
Comment #11
chop commented#3: views-1442960-3.patch queued for re-testing.
Comment #13
mxtAt the end, to resolve #10, I've found the following workaround (for D7):
1) Activate the php filter in your "No results behavior" -> "Global: text area"
2) Fill the textarea with the following code:
Do you think there is a better way to reach the same result?
Comment #14
mustanggb commentedComment #15
plachThis was actually fixed.