Override the region.tpl.php template for an internal path I have a view which I want to output as plain raw data (no html tag, no div, nothing, just the view content as text).
I managed to override html.tpl.php, and page.tpl.php templates, but i still have some default markup...
I get this:

&lt;div class="region region-content"&gt;


And don't know how to get rid of it.
I guess the region.tpl.php template is responsible for this, but how could I override it just for that given view (which has an internal path: user-export).

I tried region--user-export.tpl.php but my template is not seen by drupal.
Do I need to use a template suggestion ?

Thanks in advance!

EDIT: I found a solution.
Probably not the cleanest way but it works. I created a "blank" theme, where I overrode region.tpl.php by creating a file named region.tpl.php and stripping all divs and classes from it. I then downloaded the "Page Theme" module and set the template to "blank" for the view url.
And that was it. my view got displayed with no wrappers, no divs, just plain text.
I would personally not use the method you currently have as it would seem to be overkill.

You can use your template.php file of your theme to set a different template file to use under your given conditions.

Like this, in your theme's template.php file (Note: this is adapted from the Zen theme):

/**
 * Preprocess variables for region.tpl.php
 *
 * @param $variables
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("region" in this case.)
 */
function THEMENAME_preprocess_region(&amp;$variables, $hook) {
  // Use a template with no wrapper for the content region on the path VIEWPATH.
  if ($_GET['q'] == 'VIEWPATH' &amp;&amp; $variables['region'] == 'content') {
    // Allow a specific template to override the content region.
    // The template file will be region--no-wrapper.tpl.php
    array_unshift($variables['theme_hook_suggestions'], 'region__no_wrapper');
  }
}


Then to your theme add the region--no-wrapper.tpl.php file with the wrapper markup stripped out.

Then clear the drupal cache.