• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Marcus
#1 Posted : Tuesday, October 31, 2006 12:20:20 PM(UTC)
Marcus

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 1,786

The themes that ship with BV Commerce 5 do not include the store logo in the header automatically. If you wish to include your store logo you can use these steps:

1) Inside the /BVModules/Themes/<your theme>/ folder determine if a Header.ascx control is used or if the header is directly in the Default.Master file.

2) Edit the /BVmodules/Themes/<your theme>/Controls/Header.ascx file (or Master Page) and add the following code:

a) In Header.ascx add:
Code:
<asp:image runat="server" id="imgLogo" />


b) in Header.ascx.vb inside the "Page_Load" method inside the "If not Page.IsPostBack Then " block

add:
Code:
     imgLogo.ImageUrl = "~/" & webappsettings.SiteLogo


3) Save the files and refresh your site in a browse. Move the <asp:image> tags as needed inside the header file to look good.
birdsafe
#2 Posted : Friday, March 23, 2007 8:20:25 PM(UTC)
birdsafe

Rank: Member

Joined: 2/21/2007(UTC)
Posts: 1,113

Okay everyone -- I'm a bit lost with editing these master pages and such. I'm not a total idiot, but I'm having a heck of a time placing a logo. I've added the code as Marcus suggested in his post, but I can't get the logo in the upper left corner of the page. I'm inserting it at the top of the Header.ascx page, but it's pushed to the right. If you take, for instance, the one theme that has a colored box in the top left corner, that graphics is controlled by the master page and not the header. How can I get the logo in the Header to overlay that corner box. It pushes everything to the right, including the left column content (categories).
Cliff
#3 Posted : Friday, March 23, 2007 8:40:26 PM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

What is the name of the theme you're using?
birdsafe
#4 Posted : Friday, March 23, 2007 9:21:42 PM(UTC)
birdsafe

Rank: Member

Joined: 2/21/2007(UTC)
Posts: 1,113

I'm adapting the Painted Paper Theme
Dan Alustiza
#5 Posted : Tuesday, May 22, 2007 10:05:57 AM(UTC)
Dan Alustiza

Rank: Member

Joined: 5/6/2004(UTC)
Posts: 225

Did anyone ever get the problem with the logo location in the header figured out? With the painted theme, the logo pushes everything over, if inserted in as Marcus indicated. Tried many places in the header file, and all outcomes look horrible. It should just be placed in the upper left corner, in the dark green area, but when that is done, all the other buttons, like the home button, get pushed down below the green area, which makes the page huge, in vertical terms.
MitchA
#6 Posted : Tuesday, May 22, 2007 10:37:14 AM(UTC)
MitchA

Rank: Member

Joined: 3/3/2006(UTC)
Posts: 1,737

Have a look at this thread:
http://forums.bvcommerce...lt.aspx?f=79&m=47087

Make sure there isn't somthing else getting in the way, like the mainheadermenu. Just 'cause you're not using it, doesn't mean it's not there.

Also, make sure you have room for the image file in the logo area. Adjust the style sheet if you need to. Painted Paper's logo area is pretty small, 75px, I think. Mine's 106px, in the style sheet, Header/#branding area height: 108px.
Optimists invent airplanes,
Pessimists buy parachutes.
Carousel Designs
#7 Posted : Monday, December 3, 2007 10:36:09 AM(UTC)
Carousel Designs

Rank: Member

Joined: 12/3/2007(UTC)
Posts: 5

I'm building a custom theme and need to get the logo into the header. I tried the code above and it works fine on most pages. The image resolves to:

http://localhost/dev.babybedding/BVModules/Themes/v1/images/logo.gif

On the category pages, however, the image resolves to:

http://localhost/dev.babybedding/BVModules/CategoryTemplates/BVModules/Themes/v1/images/logo.gif

I've seen other posts regarding this problem, so I know I'm not the only one, but I'm not seeing any solutions.
Marcus
#8 Posted : Monday, December 3, 2007 3:37:23 PM(UTC)
Marcus

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 1,786

URL rewriting can be confusing to browsers because you have "directories" or "folders" that don't exist. When you have a relative image path (like ../images/logo.gif) the browser correctly interprets this as relative to the rewritten url. You need to use an ASP.NET image control and prefix your images with ~/ which is ASP.NET short hand for "figure out the real relative root of my store."
Carousel Designs
#9 Posted : Tuesday, December 4, 2007 10:57:37 AM(UTC)
Carousel Designs

Rank: Member

Joined: 12/3/2007(UTC)
Posts: 5

Thanks for responding.


I'm using the "~/" in the header control and like I said, it works everywhere except on the category pages.
Marcus
#10 Posted : Tuesday, December 4, 2007 3:26:13 PM(UTC)
Marcus

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 1,786

It could have something to do with the way asp.net handles url rewriting. Can you hard code a full url temporarily? (i.e. http://www.mydomain.com/images/mylogo.gif)
scott.mech
#11 Posted : Tuesday, December 4, 2007 4:15:02 PM(UTC)
scott.mech

Rank: Member

Joined: 4/4/2004(UTC)
Posts: 670

If your master page and webform live in different directories, the browser will interpet any relative paths from the webform. The browser is ignorant of the existance of the master page. You do not necessarily need to use a server side image, you can do as follows:

Code:

&lt;img alt="logo" src="~/images/logo.gif" runat="server" /&gt;


The asp.net 2.0 runtime will automatically rebase the relative paths.
You may notice that this also occurs on relative paths inside the &lt;head&gt; tag.

Paths inside a css stylesheet file are already relative to the stylesheet.



If you need a relative path somewhere where the runtime does not automatically rebase, you can use ResolveClientUrl. For example, from your master page, you may wish to use something similar to what follows:





Code:


&lt;img alt="logo" src="&lt;%= ResolveClientUrl("images/logo.gif") %&gt;" runat="server"&gt;



If you are still having issue, feel free to let me know.



Scott Mech

[email protected]
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012