Overriding a View table layout in module I'm trying to override a view table from within my module. I can't locate what the arguments are suppose to be and in what order (for my hook_theme func). I copied the theme file from views/themes and did no modifications. Does anyone know what is going wrong, and what should the arguments value be below?

My theme configuration is currently:

'views_view_table__opportunities_mentions' =&gt; array(
  'arguments' =&gt; array(
    'view' =&gt; NULL, 
    'title' =&gt; NULL, 
    'header' =&gt; NULL, 
    'fields' =&gt; null, 
    'class' =&gt; null, 
    'row_classes' =&gt; null, 
    'rows' =&gt; null
  ),
  'template' =&gt; 'views-view-table--opportunities-mentions',
  'original hook' =&gt; 'views_view_table',
  'path' =&gt; drupal_get_path('module', 'smd') . '/theme',
),
The easiest way to theme views is to edit the particular view in question and scroll down to find the link 'theme information'. This screen will tell you exactly what views theming templates that it is currently using and what templates you can make in your theme to override this output.

That essentially all views theming is - overriding the default markup with something to suit you designs.

@see http://www.group42.ca/theming_views_2_the_basics for an excellent tutorial on views theming

EDIT

If you want full control over the markup produced, and for this to be portable across themes, the only option you have is to create a custom module. This custom module could also have themeable components, and could even use a view to perform any heavy SQL (or you could just hand-write the SQL)

Take a look at a similiar module to get you started, and have a read through hook_theme