The module currently requires that a 'page' content type be used as the header node. It'd be nice to be able to change this to something else that is specific for the site.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | views_header_nodes-control-content-type.patch | 3.1 KB | wiifm |
| #1 | views_header_nodes-n921330.patch | 1.85 KB | damienmckenna |
Comments
Comment #1
damienmckennaHere's a patch that allows the content type to be overridden using a variable "views_header_nodes_type".
Comment #2
joachim commentedThat's definitely a feature I'd be happy to include.
The patch is a good start, but rather than a global variable, there should be an option in the plugin. You can crib from this issue for how to make Views plugin options: #915622: option to use view name as base path; to make a UI list of content types see either taxonomy module's admin UI or Views handlers that similarly let you pick a content type.
The check_plain() is moot. Or at least, I hope you trust people who have access to your settings.php! ;)
Coding standards for Drupal 6 and beyond put a space either side of the . operator.
Powered by Dreditor.
Comment #3
wiifmHmmm, just realised my issue probably duplicates this #1083458: Feature - control which content type to be used when adding a new view header node - let me know if you want me to close my issue and post the patch here.
Comment #4
wiifmClosed other issue, in favour of keeping this one alive. Also this patch should include the newly created admin.inc file and also should be pathed correctly
git diff HEAD --no-prefix --relative > ~/views_header_nodes-control-content-type.patch
How does this patch look?
Comment #5
joachim commentedThanks for the patch! I'd totally forgotten about this issue...
The changes in the handler look good (thanks for removing my todo! :)
But rather than a whole admin UI, I would put the option inside the Views handler. It's cleaner UI and it's overall less code too.