multiple variables in dynamic text action
vthirteen - July 30, 2009 - 09:22
| Project: | Imagecache Actions |
| Version: | 6.x-1.x-dev |
| Component: | Text Actions Module |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I'm sorry, it's just a silly question that could be useful for those who don't know php syntax.
in imagecache text to canvas action, text can be evaluated as php, for example returning
return $node->title; what should be passed in order to return more data, like for example node title AND the content of a cck textfield?
I know how to get the name of the variable but do not know the correct php syntax to get more than one variable.

#1
Devel module is very useful for getting your head around things like this. Among many other useful features, it gives you additional tabs in the node page view which show you the structure of a node.
#2
I'm hoping to add a bit more UI and diagnostics to the available values and how they can be accessed. As it is there are many possible values from many potential sources (occasionally conflicting), so I'm trying to develop a metadata schema that is inclusive but also reasonably accessible.
Just yesterday I thought maybe the values could be exposed in more user-friendly 'tokens', although currently I prefer the raw PHP power. Of course, that's because I already know what values are there.
The biggest problem right now is that the sample image you test on does not HAVE that metadata context (like an owning node) so extracting that data in the general case is a bit blind until the formulas are put into place and tested. :-(
My work on metadata extraction is happening in my sandbox (a separate, more powerful project), and I'm hoping to put together a presentation of sorts eventually. imagecache_actions dynamic text will end up just accessing that data and making it available to the imagecache process. Adding more logic to the textactions process is not the future. Being able to get at $node is just the first step.