I think that blockquote and cite might be common enough elements that people would want to wrap their fields that it would make sense to include them.

I'm including a patch just in case you agree. The only small issue is that the elements are then included in the list for the label, as well, where they don't really make sense.

Comments

dawehner’s picture

StatusFileSize
new1.2 KB

Let's make this a variable.

Anonymous’s picture

Hmmm, if I'm reading this right, then this would allow a module to override the options. While that would be helpful, I think that the user who would often want to use this option would be a themer who doesn't code Views modules.

dawehner’s picture

Right blockquote is probably a quite often used html element.

The question is here: which element should be in by default.
All others can be configured via the variable.

Do you think that views should expose this as setting?

persand’s picture

A custom option, as with date formats, might be the best solution?

dawehner’s picture

What about small improvements... step by step.

merlinofchaos’s picture

Status: Needs review » Fixed

Looks good. A custom option would be better, we can put that in later.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

defconjuan’s picture

For other people having the same problem, the patches above are no longer needed as they've been incorporated into the latest dev releases. You could (a) set the variables in a custom template or module or, better yet (imho as it's global), you can (b) set these in the settings.php file like so:

if (isset($conf['views_field_rewrite_elements'])) {
    unset($conf['views_field_rewrite_elements']);
  } 
        
  
  $conf['views_field_rewrite_elements'] = array(
  '' => t('- Use default -'),
  '0' => t('- None -'),
  'div' => 'DIV',
  'span' => 'SPAN',
  'h1' => 'H1',
  'h2' => 'H2',
  'h3' => 'H3',
  'h4' => 'H4',
  'h5' => 'H5',
  'h6' => 'H6',
  'p' => 'P',
  'strong' => 'STRONG',
  'em' => 'EM',
  'blockquote' => 'BLOCKQUOTE',
  'figure' => 'HTML5-FIGURE',
  'figcaption' => 'HTML5-FIGCAPTION',
  'time' => 'HTML5-TIME',
  'details' => 'HTML5-DETAILS',
  'summary' => 'HTML5-SUMMARY',
  'source' => 'HTML5-SOURCE',
  'article' => 'HTML5-ARTICLE',
  'section' => 'HTML5-SECTION',
  'header' => 'HTML5-HEADER',
  'footer' => 'HTML5-FOOTER',
  'nav' => 'HTML5-NAV',
  'video' => 'HTML5-VIDEO',
  'audio' => 'HTML5-AUDIO'
);