I'm using a View with an argument that shows a summary. An RSS feed is attached to this view. I don't want to show the RSS feed when the summary is shown.

Attached is a patch that modifies views_plugin_display::accept_attachments() to return FALSE if any argument needs a style plugin *and* is not validated (which means it's not showing the main view but some argument-related information).

Comments

infojunkie’s picture

StatusFileSize
new928 bytes

Added a guard against empty arguments.

infojunkie’s picture

StatusFileSize
new952 bytes

Fixed the code style :-)

merlinofchaos’s picture

Thinking about this one.

This will stop the display of attachments, right now, always. Are there use cases where the current behavior is more desirable?

infojunkie’s picture

That's a good point. And we can't know what usages of Views in the wild are doing with this case. To mitigate this concern, it might be worth adding an option to hide attachments in this situation. I can add this option to the display, and let it be off by default. Would that work better?

merlinofchaos’s picture

That seems like the safest option, indeed.

infojunkie’s picture

StatusFileSize
new3.28 KB

Added option to hide attachments when displaying argument summary.

merlinofchaos’s picture

Status: Needs review » Fixed

Coommitted to 6.x-3.x and 7.x-3.x

Status: Fixed » Closed (fixed)

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