Considering the maintenance of this is at minimum typing "drush features-update foo" and at maximum copying/pasting some code, it seems relatively minor. Views export/import expects these parameters, so I don't recommend changing them. Specific questions/issues like this are better suited for the Views issue queue, but I don't think this particular question has much traction. It's not a bug, nor affects performance (especially not with an opcode cache). It's a question of personal preference and semantics, some of which you may have to abandon when leveraging Drupal. ;) On Fri, Mar 18, 2011 at 9:54 AM, Sean Dague <sean@dague.net> wrote:
For instance, I find large duplication of:
'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ),
all throughout the export to be not conducive to maintainability (there are 12 instances of that stanza, 9 are exactly the same, and the other 3 only vary in their 'text' field).
I find that level of duplication somewhat problematic, and something I like to avoid.
-Sean
On 03/18/2011 09:31 AM, Carl Wiedemann wrote:
Not quite sure I understand what exactly is non-maintainable?
You may also investigate http://drupal.org/project/features for assistance with exporting Views to code.
On Fri, Mar 18, 2011 at 7:45 AM, Sean Dague <sean@dague.net <mailto:sean@dague.net>> wrote:
I'm working on a new drupal 6.x module (currently in sandbox awaiting review - http://drupal.org/sandbox/sdague/1072704) which exports it's data via views. When I implemented hook_views_default_views() I just used the export functionality on views for a few basic views to get things started.
That works, but those are both very verbose, and don't implement any i18n. Is there a standard way of trimming down the default values in those views so this becomes a bit more sane and maintainable?
Advice would be appreciated,
-Sean
--
Sean Dague Learn about the Universe with the sean at dague dot net Mid-Hudson Astronomical Association http://dague.net http://midhudsonastro.org
--
Sean Dague Learn about the Universe with the sean at dague dot net Mid-Hudson Astronomical Association http://dague.net http://midhudsonastro.org