Views currently doesn't have Context Filter support for the publishing options for nodes. Specifically the Status, Promote and Sticky fields.

I get that these are bit fields that really don't *need* context filters for the purposes of URL handling, but it would be nice to have them for things like generating summary lists that show count totals in a facet like way.

Attached is a patch that adds context filter support for these fields. Additionally I've included an exported view (in the .txt file) that demonstrates the usage of these context filters (once the patch is applied).

Lemme know if I need to make any changes to it!

Files: 
CommentFileSizeAuthor
views-publishing_options_context_filters.txt17.14 KBnetw3rker
views-missing_publising_options_context_filter-0-0.patch5.92 KBnetw3rker
PASSED: [[SimpleTest]]: [MySQL] 1,658 pass(es).
[ View ]

Comments

Category:feature» bug

I guess this isn't so much of a feature request as it is a bug report (node options should have context filters, but they don't exist).

The patch applied cleanly for me, and everything worked as expected. Nice work!

Issue summary:View changes

Great, it works fine. Thank you. But in case of "Provide default value" with "PHP code", you need to return 1/0 instead of true/false. Otherwise it returns 404.

Status:Needs review» Reviewed & tested by the community

changing status...