I've developed my own slide down toolbar at the top of my theme using CSS and javascript. Now I want to use the same toolbar in other themes, but I am finding that many themes break the layout of the toolbar because of styling issues. The toolbar has its own styles and I made them specific enough to hopefully avoid this problem. However, it seems to be a problem anyway, and I imagine it will continue to be a problem unless I find a better way to do this.
The toolbar will always look the same, regardless of what theme it is in. So now I am trying to think of a better way to handle this, instead of putting the code at the top of the body in the theme templates. Two ideas come to mind -- a custom block and a custom plugin. Even so, they would be used in various themes and could potentially continue to be a styling problem.
I'm fishing for suggestions on the best way to handle this. Any ideas?
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- rgasch created topic »Using PageUtil::addVar() to load script code« 11:48 AM
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Slide Down Toolbar
-
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
If the CSS file for your toolbar is loaded last, does that solve the problem?
I've wondered if there should be a custom ordering to the PageUtil::addVar function -
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
The crazy idea that comes to my mind is:
a margin top to the body, and put the bar there
Should try, anyways, an absolute positioned bar,
collapsible to a side,
could be enough, to be a superimposed bar over the first 30px? of the theme,
and collapse it if not needed...
and if you need help, don't hesitate to PM me,
I love that stuff
Just my 0.02
--
- Mateo T. -
Mis principios... son mis fines -
**unknown user**
- Rank: Expert
- Registered: Mar 16, 2002
- Last visit: Apr 02, 2010
- Posts: 1208
Well, basically, that's what I have done. I was just thinking maybe it would be better to somehow use it in a plugin or block instead, so it would be more portable for other themes. But I am still trying to decide the best way, hence my post here.
The biggest issue is conflicting styles, obviously. If I could have the toolbar call one CSS and ignore the main theme's CSS, that would be the best bet. But how to implement that is the main issue. -
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
Ah, I though you already defined a pretty specific style,
like a DIV#my_pretty_specific_bar_wrapper
Rules from the theme can be avoided using a simple markup
and the hard work is to override any rule for the elements in use.
The plugin and the separated stylesheet is a must, for me.
--
- Mateo T. -
Mis principios... son mis fines -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
I wish there was a CSS 'command' like:
Code
#mydiv {
formatting: default;
}
then you could remove all previous formatting done to an object. would be sweet. -
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
Hehehehe
Exactly a feature request for the CSScaffold ticket!
Please log a comment with that sweet thing!
--
- Mateo T. -
Mis principios... son mis fines
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
