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.
|
|
|
|
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). |
|
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
What is the name of the theme you're using? |
|
|
|
|
Rank: Member
Joined: 2/21/2007(UTC) Posts: 1,113
|
I'm adapting the Painted Paper Theme |
|
|
|
|
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.
|
|
|
|
Rank: Member
Joined: 3/3/2006(UTC) Posts: 1,737
|
Have a look at this thread: http://forums.bvcommerce...lt.aspx?f=79&m=47087Make 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. |
|
|
|
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.gifOn the category pages, however, the image resolves to: http://localhost/dev.babybedding/BVModules/CategoryTemplates/BVModules/Themes/v1/images/logo.gifI've seen other posts regarding this problem, so I know I'm not the only one, but I'm not seeing any solutions.
|
|
|
|
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."
|
|
|
|
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.
|
|
|
|
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)
|
|
|
|
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: <img alt="logo" src="~/images/logo.gif" runat="server" />
The asp.net 2.0 runtime will automatically rebase the relative paths. You may notice that this also occurs on relative paths inside the <head> 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:
<img alt="logo" src="<%= ResolveClientUrl("images/logo.gif") %>" runat="server">
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.