Dynamic Arguments?
jvinci - September 1, 2008 - 13:18
| Project: | Insert View |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Pasqualle |
| Status: | active |
Jump to:
Description
Is there a way to make my arguments within my view tag dynamic?
If so, what would I use? Rep Tags, PHP, tokens, something else?
An example...
Here's my tag: [view:historical_sites_by_person=block=John Adams]
Lets say I were to place this tag in a block that displayed on both on John Adams' page and Thomas Jefferson's page. I'd like to dynamically add the name of the historical person in the argument field so that I don't have to have dozens of blocks, but only one.
Let me know if this isn't clear.
And thank you.
-JV

#1
Subscribing, very much interested! greetings, Martijn
#2
Not sure if this will help give ideas
http://drupal.org/node/337727
I have a node which I insert a view which has an argument (Happens to be a name), I wanted the header of the view to have a standard text but insert the argument (name)
#3
You can use PHP, if you enable the insert view filter for the PHP input format.
Following is an example:
<?php print $my_arg = 1 ?>[view:tracker==<?php print $my_arg ?>]
this will show all of UID 1's tracking results
#4