Argument from url or node title

tjbcham - May 25, 2009 - 16:30
Project:Viewfield
Version:6.x-1.x-dev
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

I am trying to pass an argument to a view from either the url or the node title, however I must be missing something... The view works fine with the arguments, and I can add the argument manually in the arguments box, however I would like to do it automatically, either from the url where the argument would be the 2nd item or the node title... I have tried variations of %1 and %[title], [title], etc. without success... example: node title is New York, url is .../content/new-york If I put either New York or new-york in the box I get the right view showing.

#1

tjbcham - May 25, 2009 - 22:05

I did not check the "Enable token replacements" box at the bottom of the viewfield configuration page. This then gives the list of tokens available and [title] works as the argument. However, I was trying to use several view fields within the same node and this token method brakes the other viewfields, whereas having the token replacement and having a manual argument added worked ok.
Enable token replacements box checked I get an error...

* warning: array_filter() [function.array-filter]: The first argument should be an array in ..modules/location/contrib/location_cck/location_cck.module on line 390.
* warning: array_keys() [function.array-keys]: The first argument should be an array in ..modules/location/contrib/location_cck/location_cck.module on line 390.
* warning: Invalid argument supplied for foreach() in..modules/location/location.module on line 1434.

Where location module is being used to give coordinates to a map view displayed embedded with another viewfield.

#2

jerdavis - June 17, 2009 - 02:33
Status:active» postponed (maintainer needs more info)

I'm going to need more detail on how you have things setup, as right now this does not look to be an issue with Viewfield, but with Location CCK. Can you walk through your configuration and test on a generic instance?

Thanks!

Jer

#3

tjbcham - July 10, 2009 - 08:08

Yes you where right this was a problem Location CCK which is solved with a patch found here [#373465#comment-1592404]

 
 

Drupal is a registered trademark of Dries Buytaert.