Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Can you hide or remove a control panel icon? 04 Jun 2017 23:55 #15182

Hi, just wondering if it is possible to remove icon(s) from a components control panel. What file determines what is produced on the control panel?

Cheers in advance

Please Log in or Create an account to join the conversation.

Can you hide or remove a control panel icon? 05 Jun 2017 13:16 #15186

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
This stuff is located in JDom for the rendering
Namespace : html.menu.cpanel
Cpanel menu:
libraries/jdom/html/menu/cpanel.php
and buttons here:
libraries/jdom/html/link/menu/cpanel.php

JDom is gonna disapear in future. All this will be handled with a component helper. Maybe very soon. It could be the next monday, or following.
At the moment, you can override JDom in you component, placing the modified files in "dom" directory of your back-end component.
Just respect the same folders tree, and your custom file will override the native JDom. It is not using the fork system. It was designed before and JDom is independant.

Hope it helps, otherwise, I can give you more details.
If you hold patience, I tell you, this is gonna evolve soon.
Coding is now a piece of cake
The following user(s) said Thank You: jonathanbell

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Can you hide or remove a control panel icon? 05 Jun 2017 16:37 #15187

  • liubov
  • liubov's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
For that, I didn't hack JDOM, but just disable the display of Menu Item ... [helper.php]
	public static function addSubmenu($view, $layout, $alias = 'menu')
	{
		$items = static::getMenuItems();
			- - - - -
				switch($alias)
				{
					case 'cpanel':
					case 'menu':
					default:
						$links = array(
							'admin.pedigrees.default',
							'admin.etalons.default',
							'admin.lices.default',
							'admin.portees.default',
							'admin.actualites.default',
		// disable Status Icon	'admin.statuts.default',
							'admin.races.default',
							'admin.robes.default',
							'admin.yeuxs.default',
		// disable  Sexes Icon	'admin.sexes.default',
							'admin.annees.default',
							'admin.rubriques.default'
						);
Works fine too :)
The following user(s) said Thank You: admin, jonathanbell

Please Log in or Create an account to join the conversation.

Last edit: by liubov.

Can you hide or remove a control panel icon? 05 Jun 2017 16:42 #15188

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Thanks @liubov,

Of course you can do that way, and the future rewrite will include a XML file for configuring menus.
I was explaining for HTML custom (removing all icons).
But, now I understand the question was about removing a button, not an image.
For rendering customs, the CSS is also good.

You may answered better than me. So the two solutions are explained.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Can you hide or remove a control panel icon? 05 Jun 2017 17:11 #15189

  • liubov
  • liubov's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
Thanks,
Customized CPanel handle with XML will be a great feature, with a key Icon => show/hide
The following user(s) said Thank You: jonathanbell

Please Log in or Create an account to join the conversation.

Can you hide or remove a control panel icon? 05 Jun 2017 19:22 #15190

Thanks :). Got it and will now be able to sort. :)

Please Log in or Create an account to join the conversation.

Can you hide or remove a control panel icon? 06 Jun 2017 18:49 #15191

Are you going to remove the plugin Jocelyn?
That will have a huge impact on projects I made, because I call the JDom in fork to create custom actions, buttons etc.

Please Log in or Create an account to join the conversation.

Can you hide or remove a control panel icon? 06 Jun 2017 19:16 #15192

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
No, I am not gonna end with JDom now.
And will still be available and usable when you want.

JDom remains a great piece but will be used more for embeding snipplets of code, such as the Google map (or charts...) for instance.
And in case, it is still great to instance headless controls (without JForms)

But JDom is not the best for grids (memory optimization), and almost useless for the forms.
It was designed long time ago, but now Joomla has filled the gap, and building native is better and required.

So don't worry, because your component will still have some JDom inside, but ONLY where Joomla is not able natively.
It is a long way after successive versions where I will remove the CALLS step by step.
But don't worry, it will always be included by default because Cook will grow with more advanced plugins (the direction).
And for purists, I will may include an option for avoiding JDom, but restricting the exetended features.

For your forks, if they use JDom, it will always work. the problem would be if you made your customs in JDom classes which would become not called anymore.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Can you hide or remove a control panel icon? 06 Jun 2017 20:05 #15193

I am not worried, I fully agree that native is better :)

Please Log in or Create an account to join the conversation.

Can you hide or remove a control panel icon? 12 Jun 2017 09:30 #15210

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
The feature is done.

Since 3.1.9, you can now manage menus through the XML menu file.

menu.xml at the component root.
(FRONT and BACK)

This file is forkable, but will replace all.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Can you hide or remove a control panel icon? 12 Jun 2017 09:34 #15211

  • liubov
  • liubov's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
Real good job, and curious to play with ...

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.084 seconds

Amazing Tool !
And only tool I know that allows complete Scaffolding in terms of component creation. It really saves loads of time (actually much more than that). Simple architecture enables quick and painless changes at any time. Code is clean and consintent. It's just... what's the word... neat! :) Great work! You should definetely try this one!

pi_wo (JED)
         

Get Started