How to set Image icon in joomla component backend sidebar - joomla

I want to set icon in sidebar of joomla component backend
JHtmlSidebar::addEntry(JText::_('USERS'),'index.php?option=com_users&view=users',$vName == 'users') is used to create this sidebar

My initial answer was for the menu, see below.
For the sidebar, the easiest answer is probably just adding custom css to the admin-theme. By default there are no classes on the sidebar menu items, but you can use the href-tag with attribute-selectors in css, like this:
/* For each item in the sidebar: */
a[href*="yourview"]{
display: block;
padding: 0 0 0 20px;
background: transparent url(link/to/img.png) 0 0 no-repeat;
}
It is also possible to override the sidebar output by copying the file /layouts/joomla/sidebars/submenu.php to the folder html/layouts/joomla/sidebars/submenu.php, and edit this file to display like you want it. More info is found here.
For the menu: It seems like you can add this to the definition of the administration menu in /administrator/components/com_componentname/componentname.xml, like this:
<administration>
<menu img="link/to/icon.png" >COM_COMPONENTNAME</menu>
<submenu>
<menu link="option=com_componentname&view=aview" view="aview"
img="link/to/other-icon.png" alt="Componentname/Aview">
COM_COMPONENTNAME_TITLE_AVIEW
</menu>
</submenu>
</administration>
If you actually want to hide the texts (not sure if I understood you right), you'll need to add some css to the backend theme, or to your component, to accomplish this. If you need to modify the backup theme, it's probably best to make a copy of the isis-theme, so your changes are not overwritten by joomla updates.

Finally I got Answer of this question
Answer
JHtmlSidebar::addEntry('<span class="dashboard-submenuicon"></span>'.
JText::_('Dashboard'),
'index.php?option=com_mycomponent&view=dashboard',
$vName == 'dashboard'
);
We can write css code like
.dashboard-submenuicon{
background-image:url('your_image_url');
background-repeat: no-repeat;
display: inline-block;
height: 22px;
vertical-align: middle;
width: 22px;
margin-right:5px;
}

You need to be sure to include the CSS for the icon you want to add. If you inspect your links there should be an associated class. Create your component CSS to include the background-image you want to use.
The answer related to the admin menu is for Joomla 2.5 and is related to admin main top menu items, not sidebar items.

Related

i want help to change product page in prestashop 1.7.5.1

I use Prestashop 1.7.5.1.
I want the description block and product details on the product page to be on the right side of the page and also fill the entire width of the page. How can I do this? What changes should be made to the product.tpl file or to the corresponding CSS file.
It is difficult to assist you because you did not post a fiddle with your HTML/CSS code, please try to edit/update your question.
However, I'm assuming you are using the default template coming with PrestaShop 1.7.x so you should have two columns with the class "col-md-6" inside your product.tpl file.
Simply put style="float:left;" on the one containing the product picture and style="float:right;" on the other.
Regarding the width of these columns, there are currently constrained by the element:
#media (min-width: 1200px)
.container {
width: 1140px;
max-width: 100%;
}
You can for the width to 100% with width: 100%; instead, I wouldn't recommend doing this though.
Final result:

Oracle Apex 5.1 - Theme Style, referenc custom image in custom css code

I'd like to use the theme styles to generate different CI for sub companies of our main company. I would like to insert every sub-companies logo into the top naviagtion bar. The plan was to have a seperate theme style for each sub company and within each style have a custom css code which sets the background image to a referenced static file (or theme file). Unfortunately the custom css code does not seem to evaluate the substitution strings so the images can not be rendered. e.g.
div.t-Header-logo {
background-image: url(#APP_IMAGES#COMPANY1_LOGO.png);
background-repeat: no-repeat;
width: 250px; /*or your image's width*/
height: auto; /*or your image's height*/
margin: 0;
padding: 0;
}
Is there any way to achive different logos per theme style?
Thanks for your support
replace the #WORKSPACE_IMAGES# reference with it's resolved name in the CSS file.
e.g. #WORKSPACE_IMAGES#add.gif becomes-
http://apex.oracle.com/pls/otn/wwv_flow_file_mgr.get_file?p_security_group_id=441224701954687600&p_fname=add.gif
Get the resolved name for your workspace by viewing page source, copy and replace #WORKSPACE_IMAGES# with the same. It will work.
Note: make sure that the image file you have uploaded is not specific to an application.

Watir - how do I access a Material-UI Dropdown menu component?

<div style="color: rgba(0, 0, 0, 0.87); height: 56px; line-height: 56px; overflow: hidden; opacity: 1; position: relative; padding-left: 24px; padding-right: 56px; text-overflow: ellipsis; top: 0px; white-space: nowrap;">Never</div>
With the HTML listed I am trying to access the dropdown list example on the www.material-UI.com website. I have tried both of the following:
b.div(:text => "Never").click
b.span(:text => "Never").click
But it does not click on the component to open up the rest of the menu. this is my first week using Watir and I need to use it to automate a web app built using React.js and Material-UI. I have been successful with text boxes and scrolling and even clicking on images but menus and lists are proving problematic.
I'm going off of #orde's suggestion that the page in question is http://www.material-ui.com/#/components/dropdown-menu. The solution below worked for me on that page.
To open the entire menu in the "Simple example" section, you can click the button:
b.div(:text, 'Never').parent.button.click
But I'm not sure what issue you were having. Was it that the menu simply wouldn't open, or that you couldn't open the correct menu because there are multiple menus on the page with "Never" in the contents?
If the problem is the latter, then you can specify which part of the page you want to be in by honing in on the section heading. It's a bit more verbose, but
b.span(:text, 'Open Immediate example').parent.parent.parent.parent.parent.buttons[1].click
opens the second "Never" menu on the screen. (Five parents above the "Open Immediate example" text gets you to the entire div, and the second button--which has an index of 1--is the drop-down you want. Changing the text to "Simple example" will open the same menu as my first code sample above.)
The issue is that what you want is nested in multiple text nodes, in this case div tags. So getting an ElementCollection gets both the parent and the child div.
So you can do:
browser.div(text: 'Never').child.click
or
browser.div(text: 'Never', index: 1).click

How to change the width of the left menu in Joomla (Beez20)

How can I change the width of the left menu that comes with Beez20 template in Joomla 2.5?
This can be done by editing the /templates/beez5/css/position.css file.
Find
.leftbigger
{
width:15%
}
And edit the width:15%
#wrapper2
{
width: 50%;
float:left;
position:relative;
padding-bottom:20px
}
in the same file is probably what you also need to adjust.
Using Firebug or the included development tools within a browser can tell you more here.

site has a background image - cannot remove it from the editor

I'm moving from FCK editor to CK editor 3.6.3 and the site has a background image, which is appearing in the CK editor. I need to remove this while using the same CSS file for both the general site and the CK editor (to pick up on CSS for the styles dropdown).
I tried setting config.BodyClass to a style with no image - this works on FCK2.x but not the CK3. I also found via google a config.extraCss setting but I don't see it in the docs, and it does not appear to do anything anyway.
Fullpage is off (i.e. editor is not producing <body><head> etc tags))
I've got a workaround by having two CSS files, one for the site and one for CK with a different body style, but there must be a better way?
Thanks,
Kevin
Config section:
config.stylesSet = 'my_styles:/admin/ckeditor/styles_dropdown.js';
config.contentsCss = '/newdesign/style.css';
//config.extraCss = 'body {background: none;background-image: none;}';
config.BodyClass = 'fckbody' ;
CSS section (of the 'main' css file)
body{
margin:0px; padding:0px; background-image:url(/newdesign/site_bg19.jpg); repeat; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#393939;
}
.fckbody {
background-color: white;
background: none;
background-image: none;
text-align:left;
}
The correct name in CKEditor is bodyClass with an initial lower case.
Thought I should post my insight here for my findings. I came across this page while looking for a reason why my CKEditor was showing a background image of my site.
If you CKEditor is showing a background image on the Make a Comment section of a node :
1 - Head to "admin/config/content/wysiwyg"
2 - click edit to the text format for which text format is showing the background image
3 - click the CSS tab drop down
4 - change the Editor CSS to "Editor Default CSS".
Hope this helps someone!

Resources