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> &lt;enclosure url=&quot;http://mysite.pt/sites/default/files/styles/min_216_216/public/fpc/img_3.jpg&quot; length=&quot;7651&quot; type=&quot;image/jpeg&quot; /&gt;
</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

maciej.zgadzaj’s picture

Status: Active » Fixed

It 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.

marco_cruz’s picture

I'm not familiarized with Views Hooks.

Can you point me a direction, for instance, which hook should I use..

thanks

Matt B’s picture

I 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...

maciej.zgadzaj’s picture

Start 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

improved explanation