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.



Summit’s picture

Subscribing, very much interested! greetings, Martijn

midkemia’s picture

Not sure if this will help give ideas

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)

mlsamuelson’s picture

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
Pasqualle’s picture

Assigned: Unassigned » Pasqualle
Category: support » feature
vgulla’s picture

Issue tags: +argument, +token, +views send


I hope this thread is still monitored. I am trying to using insert view with views send and want to pass a token as argument like this. This is not working and giving me an error.

Please let me know what I am doing wrong.


mystatus is my view and [views-send-uid] is the token with user's userid

Pasqualle’s picture

probably the insert_view filter is evaluated first, in which case the [views-send-uid] does not mean anything for the filter..

vgulla’s picture

Can someone help please?

vgulla’s picture

Can someone help please?

vgulla’s picture

bumping it to get some help

hdornier’s picture


vgulla’s picture

please help

vgulla’s picture

Can someone help please?

Alan D.’s picture

@vgulla - did you understand the response from Pasqualle? This means that you need to configure your input filter to ensure that the token filter is run before the insert view filter replacement.

rosso69’s picture

I installed the token_filter module.
Changed the filter processing order. Still it doesn't handle the tokens well.

Creating a node with a token
[view:news=block=[simplenews-subscriber:mail]] shows only an ].
When i replace [simplenews-subscriber:mail] with a the node shows the view.

Is it possible the ]] is a preg_match problem?
Or do i need to find another solution?

pverrier’s picture

I'm using Drupal 7 and have the same need: I wish to insert in a (simplenews) newsletter the list of (conference) registrations the recipient has done.
I also tried to use a token in a token, [view:my_vue=my_display=[simplenews-subscriber:user:uid]], and I confirm it doesn't work!

First of all, nested tokens seem, for now, not supported. See issue #2076821 'Please allow for nested tokens'.

Secondly, (@rosso69) if your need is to insert a view in a simplenews newsletter, using Insert View will be no help because input filters are processed before the simplenews tokens are replaced; the only way I found was to create custom tokens; see my solution on issue #1835896 of Simplenews .

pverrier’s picture

I just discovered the Views Send module, which is very much appropriate to send content dynamically computed for the recipient user...