when building custom_pagers, I modeled the view handling system after viewfield's. Along the way, though, I wrote token.module to handle the funky needs of various tokenizing needs that popped up (showing links to other nodes that appear on the same day as the current node, and weird stuff like that).

Using it for this would allow you to do quite a bit of crazy stuff -- listing all amazon nodes that share the same ASIN, or MP3 files by the same artist...

CommentFileSizeAuthor
#2 viewfield-arg-token-replace.patch2.61 KBray007

Comments

moshe weitzman’s picture

oooh. yes.

ray007’s picture

StatusFileSize
new2.61 KB

Here a quick hack to use the token-module instead of the few static replacement patterns.
Lightly tested, but worked for me.

What do you think?

ray007’s picture

Status: Active » Needs work
ray007’s picture

Is my patch so perfect that nobody complains, or so crappy that nobody thinks it's worth to comment on?

mfredrickson’s picture

Hi ray007,

Looks pretty good. I've tightened up a couple of things, but I pretty much committed it straight away.

Right now, there's a bug in token that will prevent me from bundling this in a release just yet: content_view() not recursive safe

Thanks again
-Mark

ray007’s picture

Happy that you like it ;-)

Some questions I already hinted at in code-comments:
- Should we have a setting to enable/disable token usage for the viewfield module?
- Do we want/need a setting to enable/disable token usage on a per-field basis?

I think we need at least one of the 2 to not break existing settings with an upgrade of viewfield.
Currently, it's either token-module or the current replacement patterns, maybe we want to check the old patterns too even if we have the token module?

I didn't think too much about the userinterface and those settings when I whipped up the patch, was just a proof of concept how to do it. But it shouldn't be too add and check those settings ;-)

ray007’s picture

Checking your last cvs commit, you added some calls to dprint_r() to check what my patch does, which I guess should be removed again ...

ray007’s picture

Priority: Normal » Critical

I just tried the last viewfield checking and together with an activated token-module I get a white screen ... seems there still a problem somewhere.
Downgrading viewfield now.

dkruglyak’s picture

Version: 5.x-1.0 » 5.x-1.2
Category: feature » task

Upgrade the token module to the latest. I had this problem with recursion too but getting the latest token fixed it...

niklp’s picture

Is this issue going anywhere now...? :)

jamesJonas’s picture

Has this code been committed? This sounds like a great feature. #9 seems to indicate a green light.

aren cambre’s picture

Also urging this and several other patches being committed and rolled out into Viewfield 1.3.

zach harkey’s picture

+1 +Subscribing

Without this feature, the viewfield module is a one trick pony.

darren oh’s picture

Status: Needs work » Closed (fixed)

Old issue fixed in CVS commit 73054.