Skip to main content
added 32 characters in body; edited title
Source Link
FFrewin
  • 19.8k
  • 10
  • 48
  • 101

remove Remove css admin template from component

I'm designing a custom component where I am utilising the tmpl=componenttmpl=component ability to render the component only rather than displaying the default template.
How can I, within the component remove the unwanted css files from the sites head which are creating a styling conflict, from the site's head, within the component ? use

I use this codes and insert after defined('_JEXEC') or die;

         //get the array containing all the script declarations
     $document = JFactory::getDocument(); 
     $headData = $document->getHeadData();
     $styles = $headData['styles'];

     //remove your script, i.e. mootools
     unset($styles['/administrator/templates/isis/css/template-rtl.css']);

     $headData['styles'] = $styles;
     $document->setHeadData($headData);

and this code

unset($this->item->_styles[JURI::root(true) . '/administrator/templates/isis/css/template-rtl.css']);

but , these code not work

iI want to delete administrator/templates/isis/css/template-rtl.cssadministrator/templates/isis/css/template-rtl.css from customsomponentcustom component source and head shot.

A Screenshot from custom component source enter image description here

remove css admin template from component

I'm designing a custom component where I am utilising the tmpl=component ability to render the component only rather than displaying the default template How can I, within the component remove the unwanted css files from the sites head which are creating a styling conflict? use this codes and insert after defined('_JEXEC') or die;

         //get the array containing all the script declarations
     $document = JFactory::getDocument(); 
     $headData = $document->getHeadData();
     $styles = $headData['styles'];

     //remove your script, i.e. mootools
     unset($styles['/administrator/templates/isis/css/template-rtl.css']);

     $headData['styles'] = $styles;
     $document->setHeadData($headData);

and this code

unset($this->item->_styles[JURI::root(true) . '/administrator/templates/isis/css/template-rtl.css']);

but , these code not work

i want delete administrator/templates/isis/css/template-rtl.css from customsomponent source and head shot from custom component source enter image description here

Remove css admin template from component

I'm designing a custom component where I am utilising the tmpl=component ability to render the component only rather than displaying the default template.
How can I remove the unwanted css files which are creating a styling conflict, from the site's head, within the component ?

I use this codes and insert after defined('_JEXEC') or die;

         //get the array containing all the script declarations
     $document = JFactory::getDocument(); 
     $headData = $document->getHeadData();
     $styles = $headData['styles'];

     //remove your script, i.e. mootools
     unset($styles['/administrator/templates/isis/css/template-rtl.css']);

     $headData['styles'] = $styles;
     $document->setHeadData($headData);

and this code

unset($this->item->_styles[JURI::root(true) . '/administrator/templates/isis/css/template-rtl.css']);

but , these code not work

I want to delete administrator/templates/isis/css/template-rtl.css from custom component source and head.

A Screenshot from custom component source enter image description here

Source Link
niaziblog
  • 111
  • 1
  • 7

remove css admin template from component

I'm designing a custom component where I am utilising the tmpl=component ability to render the component only rather than displaying the default template How can I, within the component remove the unwanted css files from the sites head which are creating a styling conflict? use this codes and insert after defined('_JEXEC') or die;

         //get the array containing all the script declarations
     $document = JFactory::getDocument(); 
     $headData = $document->getHeadData();
     $styles = $headData['styles'];

     //remove your script, i.e. mootools
     unset($styles['/administrator/templates/isis/css/template-rtl.css']);

     $headData['styles'] = $styles;
     $document->setHeadData($headData);

and this code

unset($this->item->_styles[JURI::root(true) . '/administrator/templates/isis/css/template-rtl.css']);

but , these code not work

i want delete administrator/templates/isis/css/template-rtl.css from customsomponent source and head shot from custom component source enter image description here