×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
how to add backend css
Tomasci
New Member
Posts: 17
7 года 9 мес. назад #1508
от Tomasci
Tomasci создал тему: how to add backend css
Hello,
I am new to component creator. And I must say, it is a very nice concept. But there is sooo little documentation.
Hopefully someone can point me in the rigth direction.
I want to add some styles to my component form in backend.
Where to add this?
thanks
I am new to component creator. And I must say, it is a very nice concept. But there is sooo little documentation.
Hopefully someone can point me in the rigth direction.
I want to add some styles to my component form in backend.
Where to add this?
thanks
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Randy Carey
Junior Member
Posts: 23
7 года 9 мес. назад - 7 года 9 мес. назад #1510
от Randy Carey
Randy Carey ответил в теме how to add backend css
For component-specific styling, I tend to create a directory path on the component of assets/css/ and then add a style sheet with a name like style.css. In the layout files (pattern: views/myview/tmpl/default.php) I add code that adds the style sheet to the document object, so that when the page is rendered, the document adds the style sheet's declaration to the page's header. Here is example code for adding it in the backend of the component:
If you want to learn how components work in Joomla... study the code of the components built by Component-Creator, study the core components like com_content and com_contact, and study some Joomla programming books such as Joomla Programming and Programming Joomla Plugins. Get a good IDE like PhpStorm, connect it with a debugger, and walk through code as it is executing - this goes a looong way. Finally, expect it to take months, and even over a year to become an expert at understanding how Joomla works and at programming solutions in Joomla.
$document = JFactory::getDocument();
$document->addStyleSheet(JUri::root() . 'administrator/components/com_mycomponent/assets/css/style.css');
If you want to learn how components work in Joomla... study the code of the components built by Component-Creator, study the core components like com_content and com_contact, and study some Joomla programming books such as Joomla Programming and Programming Joomla Plugins. Get a good IDE like PhpStorm, connect it with a debugger, and walk through code as it is executing - this goes a looong way. Finally, expect it to take months, and even over a year to become an expert at understanding how Joomla works and at programming solutions in Joomla.
Последнее редактирование: 7 года 9 мес. назад пользователем Randy Carey.
Спасибо сказали: Andres Maeso, Tomasci
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Andres Maeso
Platinum Member
Posts: 338
7 года 9 мес. назад - 7 года 9 мес. назад #1514
от Andres Maeso
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Адрес электронной почты защищен от спам-ботов. Для просмотра адреса в вашем браузере должен быть включен Javascript.
Andres Maeso ответил в теме how to add backend css
Great advice, Randy, thanks!
We also suggest to check Joomla's official documentation in case of doubt: docs.joomla.org/
We also suggest to check Joomla's official documentation in case of doubt: docs.joomla.org/
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Адрес электронной почты защищен от спам-ботов. Для просмотра адреса в вашем браузере должен быть включен Javascript.
Последнее редактирование: 7 года 9 мес. назад пользователем Andres Maeso.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Время создания страницы: 0.060 секунд