Jump to content

CSS in sidebar widgets


ChrisTERiS

Recommended Posts

Getting as example this article, I tried to do the same in a sidebar widget but it does not works:

$secondarySidebar->addChild('mywidget', array(
	'label' => 'Header Text',
	'icon' => 'fas fa-user',
	'bodyHtml' => 'Here is the main text',
	'footerHtml' => 'Footer Text',
	'extras' => array(
		'color' => 'blue',
	),
));

 

Any idea on how to add the blue top border in the widger?

Thank you

Chris

Link to comment
Share on other sites

22 hours ago, WHMUp said:

Any idea on how to add the blue top border in the widget?

I suspect you could do it your way if you modified sidebar.tpl to expect a color to be passed to it as an extra (and assuming the CSS was defined for it as per the panels).

the way I would do it would be to use setClass...

it would still work on v8.1 and Six...

tSSw80O.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated