The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Thu Sep 20, 2007 1:38 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 20, 2005 11:30 pm
Posts: 218
Location: Oregon
I'm confused by how to use my own icon in an admin menu. It appears that i need to use some CSS but not sure exactly the procedure.

I've got this in my view.html.php:

Code:
$document =& JFactory::getDocument();
$document->addStyleSheet('administrator/components/com_biblestudy/css/general.css');


Then:

Code:
.icon-48-generic {
background-image:url(../images/header/openbible.gif);
}


In my general.css file.

Then back to view.html.php:

Code:
JToolBarHelper::title(   JText::_( 'Books Manager' ), 'generic.png' );


Just shows the generic.png in my admin toolbar.

Any advice?

_________________
Author of component Joomla Bible Study:
http://www.JoomlaBibleStudy.org


Top
 Profile  
 
PostPosted: Thu Sep 20, 2007 2:50 am 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Sat Sep 24, 2005 11:01 pm
Posts: 4785
Location: Toronto, Canada
Try changing generic to something else.  i.e. myspecialicon or openbible.png.  Your style might get overwritten by the Joomla! default, depending on the order it gets loaded.

Ian


Top
 Profile  
 
PostPosted: Thu Jul 30, 2009 11:06 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Jul 20, 2009 10:05 pm
Posts: 4
When I used addStyleSheet, it did not work for some reason.. so I did the following which did work:

$doc =& JFactory::getDocument();
$style = " .icon-48-fb {background-image:url(components/com_formbuilder/fb.gif); no-repeat; }";
$doc->addStyleDeclaration( $style );

JToolBarHelper::title( JText::_( 'Generalized Form Builder     ' ), 'fb.gif' );


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 



Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group