Jump to content



Latest News: (loading..)

- - - - -

Move navbar from separate area to in-page element


This topic has been archived. This means that you cannot reply to this topic.
16 replies to this topic

#-19   oxwivi

oxwivi
  • Members
  • 250 posts

Posted 20 January 2012 - 12:56 PM

Navigation bar occupies it's own space by default, I want it to become a part of the page instead of being separate.

This osCommerce template: freeoscommerce.com/demo2/?template=045 demo shows how I want it to be.

PS Is there a way to replace Top >> Catalog with simply Home?

Edited by Jan Zonjee, 19 March 2012 - 07:57 PM.


#-18   14steve14

14steve14

    STORE OWNER NOT CODER

  • Members
  • 3,113 posts

Posted 20 January 2012 - 03:05 PM

To move the navbar just cut the code from includes/header and paste into the to every page in your root or catalog foler, where you want it to appear.  I expect someone will come up with a better way of doing it.

To remove the top from the header read the how do i post thats pinned to the installation forum.
REMEMBER BACKUP, BACKUP AND BACKUP
I am not a coder, so dont bother sending PMs asking for help as you wont get any.  

OSC has a steep learning curve, but in general the program does work.  If it doesnt work, the chances are it is something you have done.

#-17 ONLINE   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,828 posts

Posted 20 January 2012 - 03:12 PM

@oxwivi,

As with ALL commercial templates, I suggest you contact the template creator for support.



Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

#-16   oxwivi

oxwivi
  • Members
  • 250 posts

Posted 20 January 2012 - 03:39 PM

View PostDunWeb, on 20 January 2012 - 03:12 PM, said:

As with ALL commercial templates, I suggest you contact the template creator for support.

With respect, I'm not seeking support regarding the linked commercial template. I am quoting it as an example to show the desired results - a picture is better than a thousand words, as they say.

#-15   oxwivi

oxwivi
  • Members
  • 250 posts

Posted 20 January 2012 - 03:41 PM

View Post14steve14, on 20 January 2012 - 03:05 PM, said:

To move the navbar just cut the code from includes/header and paste into the to every page in your root or catalog foler, where you want it to appear.

Won't that retain that theme background (blue in the default theme)? I don't really like that, and would get rid of it if possible.

#-14 ONLINE   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,450 posts

Posted 20 January 2012 - 04:31 PM

You don't need to add that to every file, it will be enough if you move the part out of includes/header.php and into includes/template_top.php after the <div id="bodyContent">

I would however leave in in the header.php and modify the file accordingly so it gives the impression the whole thing is within the content (= same width as the content)

As for background etc, this has nothing to do with the location, you can wrap it into your own classes and style in css

#-13   oxwivi

oxwivi
  • Members
  • 250 posts

Posted 20 January 2012 - 04:49 PM

View Postmultimixer, on 20 January 2012 - 04:31 PM, said:

I would however leave in in the header.php and modify the file accordingly so it gives the impression the whole thing is within the content (= same width as the content)

How so? I don't see any way to make it like it's besides the left column instead of above it.


View Postmultimixer, on 20 January 2012 - 04:31 PM, said:

As for background etc, this has nothing to do with the location, you can wrap it into your own classes and style in css
I only know it currently obeys jQuery UI themes.

#-12   14steve14

14steve14

    STORE OWNER NOT CODER

  • Members
  • 3,113 posts

Posted 20 January 2012 - 04:52 PM

I knew someone would come with a better easier idea.

Looks like you have to go away and learn at least basic css.
REMEMBER BACKUP, BACKUP AND BACKUP
I am not a coder, so dont bother sending PMs asking for help as you wont get any.  

OSC has a steep learning curve, but in general the program does work.  If it doesnt work, the chances are it is something you have done.

#-11   oxwivi

oxwivi
  • Members
  • 250 posts

Posted 18 March 2012 - 06:42 PM

After experimenting as multimixer suggested, I ended up with the breadcrumb in various positions, depending on where I placed the breadcrumb code.

I wanted the breadcrumb to be on line and between the boxes on either side of a given page, and the closest thing I achieved was by adding the breadcrumb code to the bottom template_top.php, and the result is attached.

Can it be fixed?

It is to be noted that other positions with different code placements did not appear broken in anyway. Without going into the exact details on how I got them, the other positions that worked were: top right corner with width limited to text, exactly on top, the same width as stock breadcrumb, and the stock position.

Attached Files



#-10   kymation

kymation

    Believers

  • Community Sponsor
  • 6,763 posts

Posted 18 March 2012 - 07:09 PM

It looks like you left in the grid_24 class, so it's trying to be full width. Change that to grid_16 and see what happens.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#-9   oxwivi

oxwivi
  • Members
  • 250 posts

Posted 18 March 2012 - 08:49 PM

View Postkymation, on 18 March 2012 - 07:09 PM, said:

It looks like you left in the grid_24 class, so it's trying to be full width. Change that to grid_16 and see what happens.
You were correct. I did as you suggested, and attached the revised screen shot.

Can it be made to align with the boxes on either side? The spacing is incorrect as well. :(

Anyway, thanks for the tip! I finally feel like it's going somewhere.

Attached Files



#-8   kymation

kymation

    Believers

  • Community Sponsor
  • 6,763 posts

Posted 18 March 2012 - 08:59 PM

Yes, you can add some padding above the bar to push it down. I would start by adding in-line CSS to the containing div.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#-7   oxwivi

oxwivi
  • Members
  • 250 posts

Posted 19 March 2012 - 06:15 AM

That take cares of it's vertical position, but what about the horizontal spacing issue? As you can see on the screen shot, the bar is closer to the right-side, and not explicitly in the middle. Or are you suggesting to use padding to push it to the left as well?

#-6 ONLINE   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,450 posts

Posted 19 March 2012 - 07:45 AM

I guess you have the whole thing wrapped into a grid_16 class.

Each grid_xy class is adding a margin of 5px (depending on the "gutter" you have in your 960gs css file) left and right.

The way to set the left or right margin to 0, is to apply additionally a "alpha" or "omega" class

In short, change the <div class="grid_16"> to <div class="grid_16 alpha"> , this should fix the issue.

If not, post the concrete code you use

#-5   oxwivi

oxwivi
  • Members
  • 250 posts

Posted 19 March 2012 - 08:05 AM

@multimixer, thanks! That worked perfectly. The noob-friendly 'in short' was also helpful specially since I had no idea how those stuff work.

This was added at the bottom of template_top.php:
<div class="grid_16 alpha ui-widget infoBoxContainer">
  <div class="ui-widget-header infoBoxHeading"><?php echo '&nbsp;&nbsp;' . $breadcrumb->trail(' &raquo; '); ?></div>
</div>

Attached File  breadcrumb.png   20.38K   13 downloads

Now off I go to Google for div padding to push it down as @kymation suggested. Speaking of which, if pushing it down somehow gets it overlayed on the text below, will it be fixed if I pad below as well?

Attached Files


Edited by oxwivi, 19 March 2012 - 08:06 AM.


#-4   oxwivi

oxwivi
  • Members
  • 250 posts

Posted 19 March 2012 - 08:46 AM

Padding 5px perfect aligns it. For others seeking to move breadcrumb to the top of pages, here's how:
  • Remove the following code from /includes/header.php:
<div class="grid_24 ui-widget infoBoxContainer">
  <div class="ui-widget-header infoBoxHeading"><?php echo '&nbsp;&nbsp;' . $breadcrumb->trail(' &raquo; '); ?></div>
</div>
  • Paste the following code (slightly modified to fit between the boxes) at the end of template_top.php:
<div class="grid_16 alpha ui-widget infoBoxContainer padded">
  <div class="ui-widget-header infoBoxHeading"><?php echo '&nbsp;&nbsp;' . $breadcrumb->trail(' &raquo; '); ?></div>
</div>
  • To horizontally align the breadcrumb with the boxes, at the following before the </head> tag at template_top.php:
  <style>
	div.padded {
	  padding-top: 5px
	  padding-bottom: 0px
	}
  </style>

And the end result is the screen shot I attached. If you think the breadcrumb could do with a little more space before the text, you can change the padding-bottom value as you see fit.

Attached Files



#-3   oxwivi

oxwivi
  • Members
  • 250 posts

Posted 19 March 2012 - 09:22 AM

Correction: padding-bottom does not help push down the elements below it. Someone in the know of these things, please suggest a solution.