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
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

Summit - November 25, 2008 - 20:41

Subscribing, very much interested! greetings, Martijn

#2

midkemia - November 25, 2008 - 23:11

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

mlsamuelson - December 18, 2008 - 20:01

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

Pasqualle - March 24, 2009 - 23:25
Category:support request» feature request
Assigned to:Anonymous» Pasqualle
 
 

Drupal is a registered trademark of Dries Buytaert.