0

I'm creating an RSS feed using the default Views RSS display and by default it contains a bunch of characters that cause the output to be invalid XML (I believe this has to do with bugs within views related to double encoding or other related functions).

So, to fix this, during hook_views_pre_render() I am able to manipulate the fields with php to output valid stuff. Within views when I "preview" the output, it's exactly as it should be.

However, when I view the actual feed output at the views url, the output has changed because views has done something to render it (I'm assuming putting it thru the theme system, etc), thereby breaking my 'fixes' again.

Manipulation of the fields in the UI (ie. using plain text as the output, etc) don't do what i need, so those aren't an option.

Is there a way, programmatically, to disable any rendering and tell views to output exactly what I'm seeing in the Views preview?

0

Yes under Advanced there is a Theme Information link that will show you template file(s) that you can override to meet your needs depending on the display format selected (fields, rendered entity, etc).

If you need to change how the page itself renders for example, you can also affect the sitewide theme function used to create the url by changing theme function in hook_menu.

  • The problem is, something is happening between the Views Preview and the $view object accessible within the template files. By the time it gets to the template files, its already been messed up, so I need to figure out the step where it's rendering, and alter that (which is before the theme layer) – Bobby Apr 18 '17 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.