Skip to content

View title appearing twice does not work for cernpublic theme

Summary

The issue was fixed in a previous issue, however it is not fixed for cernpublic theme.

Steps to reproduce

On CERN Public theme:

  1. Create a view page
  2. Title appears twice

Possible fixes

In cernbase.theme the code currently removes only the block from cernclean (CERN Theme). Add a conditional to check if the theme is cernclean or cernpublic.


	if ( $view_id &&  $variables['page']['content']['cernclean_page_title']){
		$view = \Drupal\views\Views::getView($view_id);
		if( !empty($view->getTitle())){
			unset($variables['page']['content']['cernclean_page_title']);   // <= change it here
		}

Attachments

  • Screenshot_2019-05-07_at_16.55.57
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information