Hi
First of all thanks for this fantastic module!
I'm building a RSS Feed with Views RSS, using two different content types.
They are pretty much the same, I'm using the fields: Title, Body, Image (From Content A),Image (From Content B), Path and Post Date.
The Image Fields really need to be diferent because the image files are stored in deferent ways.
So I've managed to use Field A wen the Field B as no results (in the "No results behavior" section of field B configuration), but the best result i get is:
<enclosure> <enclosure url="http://mysite.pt/sites/default/files/styles/min_216_216/public/fpc/img_3.jpg" length="7651" type="image/jpeg" />
</enclosure>
instead of
<enclosure url="http://mysite.pt/sites/default/files/styles/min_216_216/public/fpc/img_3.jpg" length="7651" type="image/jpeg" />
Wich field formatter should I use in Field A so it can be used in field B and I get a correctly built <enclosure>
tag
Comments
Comment #1
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedIt is not going to work this way I am afraid. You would need to solve it in a different way, using one of Views hooks for example.
Comment #2
marco_cruz CreditAttribution: marco_cruz commentedI'm not familiarized with Views Hooks.
Can you point me a direction, for instance, which hook should I use..
thanks
Comment #3
Matt BI have the same issue - I have media files stored in different fields on different content types - and need to have them stored in that way, but need them to map to one enclosure field. Care to expand on how we might use views hooks? A few hints might help...
Comment #4
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedStart with reading Views hooks.
I guess you could use for example
hook_views_pre_render(&$view)
, check what data you have available in$view->result
and move it between fields if required.Alternatively you could probably also try
hook_views_query_alter(&$view, &$query)
to alter the query instead of messing with the results.Essentially you just have to play with those hooks, dump their parameters, see what data is available where and based on this decide what would be the best option in your specific situations to achieve your required output.
Comment #5.0
(not verified) CreditAttribution: commentedimproved explanation