Views 2 - "Header" and "Footer" areas
First off, if this has already been discussed/decided or if, as a non-views-developer, just a web-dev using drupal, I'm not allowed to post here, please say so and I'll move along never to return to this group.
Right, onto something which in the current drupal5 views module, I've found a little frustrating.
It's related to the Header, Empty text and Footer text input areas.
I have to lock down the Views area to knowledgeable site admin's only, as users I define as editors have a nasty habit of breaking my carefully constructed views logic.
Without a lot of template hacking, by default, it means I have to edit any Header/Footer or Empty text content for them on request.
Would it be possible to assign standard/defined content pages for these three areas, as an 'override' to the default behaviour?
I'm not entirely sure how this would be done from a UI perspective and haven't a clue from a development perspective.
Perhaps a URL field beneath each of the textareas?
It's likely I'm the only person who has ever considered the current header/footer implementation a limitation.
It's also more than likely there's a totally obvious and easy way to allow users to edit a views header/footer/empty text content without being able to access the entire views admin area. If there is, I haven't found it yet.
Thanks in advance.



Use a block
If your users can edit custom block text, one option is to create a block for the text that your users can edit, then include it into your header/footer using something like the following, where the block you want to use is the custom block #3 created by the block module:
<?php$block = (object) module_invoke('block', 'block', 'view', 3);
print theme('block', $block);
?>
I'd agree, though, that it might be a nice feature request for Views 2 to have a more intuitive way of doing this.
The other solution is to leave the headers and footers empty and use Panels to create a panels page that has your custom header text in one panel, the view below it, then your custom footer in a panel. That will work fine if your custom headers & footers don't need any information from the view results.
Yes, I see the logic, but it
Yes, I see the logic, but it does require an extra step into the template files.
The ability for a client to edit these areas is a feature idea that has been borne out of using Drupal for 5 different clients so far, all with very different needs.
Each and every client has asked why they cannot edit the intro text in some areas. There is simply no way that I will allow them access to all the different Views I've configured.
There's no reason that
There's no reason that someone couldn't write a module that provided access to just those fields, but I admit I have no plans to cater any part of the Views 2 UI to non-administrators right away.
However, the model the UI is using shouldn't make it too hard to write a scaled down UI that has limited access to field editing and might even allow viewing information about the view that can't be edited.
That sounds like a solution.
The module sounds like a solution. It would then be a case of educating editors how to edit those sections.
Your second idea sounds a lot more interesting :)
However, after considering this for a while, it would seem that adding a feature such as this to Views 2 perhaps isn't the answer to my specific problem?
What could be more logical, would be the ability to append a view to a node without the need to muck about with templates.
Possibly a module like this already exists?
Actually they were the same
Actually they were the same idea; an additional module that implements what is basically a subset of the UI.
There isn't anything I'm aware of that would allow the appending of views to nodes, though.
viewfield
There's a viewfield... You could have a node with a header field, a footer field, and the view field in the middle.
Michelle
See my Drupal articles and tutorials or come check out the Coulee Region
Ah, ok, I get you.
Ah, ok, I get you.
I suppose this could get overly complex in that it becomes a discussion about additional layers of role related permissions, whereas this is discussion area about views - not the functionality of drupal as a whole.
The thing is, the views module has become such an integral part of Drupal, it's a wonder that it isn't in Drupal core.
I'm sure it's been discussed plenty - I'm very new to Drupal, so I haven't had the time to investigate further.
I'll try not to ramble too far of course, but it does seem that user permissions is an area that could lend itself to further customisation.
Aside from Views, the menu system in Drupal5 has been a constant worry for me.
I have a dev setup of Drupal6 at work and I'm very impressed with the improvements on that score.
To take your idea further on that additional module, it could allow for other minor views tweaks to "lesser" editor roles - tweaks which wouldn't result in a loss of functionality and admin's worst nightmare.
Of course, adding layers of complexity vs. simplicity and elegance is always a concern.
There's a plan to get the
There's a plan to get the view api (not the ui) into core for Drupal 7 - (and CCK as well). Neither of these are very simple tasks though.
I'd probably look at viewfield (or Panels 2) if you want people to be able to use views alongside other stuff without editing them directly.
viewfield doesn't seem to be ported to D6 yet.
any takers?