BV Commerce Forum
»
BV Commerce Support
»
How Do I? Questions
»
How to fix an affiliate theme folder and its master page files to NOT reference another theme?
Rank: Member
Joined: 10/29/2008(UTC) Posts: 66
|
I would LOVE it if somebody could help me out with this. It is a bit convoluted so I'll do my best to explain it
Let us say...
I began with a theme named Bvc5.
My host created a new version of this theme called AutoTech. In the AutoTech folder is a default.master with the following text:
<%@ Master Language="VB" CodeFile="default.master.vb" Inherits="BVModules_Themes_AutoTech_default" %>
I wanted to create a new theme so I created a DUPLICATE of the Theme folder and named it STEALTH. Not knowing what I was doing, I assumed that all I had to do was duplicate the AutoTech folder and it would work fine.
Now I notice that inside the STEALTH theme folder is a default.master file with the following text:
<%@ Master Language="VB" CodeFile="default.master.vb" Inherits="BVModules_Themes_AutoTech_default" %>
AND a default.master.vb file with the following text:
Partial Class BVModules_Themes_AutoTech_default Inherits System.Web.UI.MasterPage End Class
My question is this... Should I change the above default.master and default.master.vb to reference STEALTH instead of AutoTech?
Also, I noticed that the default.aspx file in the root directly of my site looks likke:
<%@ Page MasterPageFile="~/BVModules/Themes/StealthAuto/Default.master" Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
Will this cause problems with my other themes?
Thanks for any of you who bravely take a stab at answering this question.
If it is too confusing to answer my question, maybe you can simply write the PROPER way to "duplicate" a theme folder in order to make a new affiliate theme.
THANKS!
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 1,786
|
You need to change both the default.master.vb file and default.master file to reference BVModules_Themes_STEALTH_default
Also, yes you need to change the ~/BVModules/Themes/STEALTH/Default.master reference if you want to view the design changes in visual studio. This setting is overwritten at runtime which is why your old AutoTech theme works despite referencing the StealthAuto theme.
|
|
|
|
Rank: Member
Joined: 10/29/2008(UTC) Posts: 66
|
Thanks Marcus! OK, I think I am understanding for the most part. BUT, I still don't understand what the default.aspx file in the root directory should be pointing to. Does it matter that this always points to one theme folder (STEALTH in this case), like it is now: This is in WWW>default.aspx: <%@ Page MasterPageFile="~/BVModules/Themes/STEALTH/Default.master" Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> If it is supposed to always point to one theme folder, then would't that mean that it would force the StealhAuto css on all visitors? Or does this only force visitors to the StealthAuto theme that do not come with another affiliate link like http://www.site.com/default.aspx?affid=XXXI have a few other questions that I will be posting, bu maybe you could make an "Idiots Guide to Duplicating a Theme Folder"? and post it, i am sure a LOT of people would benefit from it. Thanks again Marcus. After 4 years I am finally getting to understand BV and the more I use it the more I LOVE it. I will definitely be buying your software for every e-commerce site I launch in the future. :-D
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 1,786
|
The masterpagefile="" part of the default.aspx page is only used by Visual Studio because we overwrite it at run time with the correct master page. You only need to change this to view the page in the "design" view in Visual studio. Otherwise it really doesn't matter what it's set to.
|
|
|
|
Rank: Member
Joined: 10/29/2008(UTC) Posts: 66
|
Ok.
Question 1) When I make a duplicate folder for a new theme, I should change every .master file that has something like:
Inherits="BVModules_Themes_AutoTech_Home" %>
to:
Inherits="BVModules_Themes_Stealth_Home" %>
And every .master.vb that has:
Partial Class BVModules_Themes_AutoTech_Home
To this:
Partial Class BVModules_Themes_STEALTH_Home
Right?
Question 2)
Do I need to do anything to any .aspx pages when I make a duplicate folder to create a new theme?
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 1,786
|
Yes, you should change all of the class names for the .vb files (codebehind files) and also change the references in the .master pages.
|
|
|
|
Rank: Member
Joined: 10/29/2008(UTC) Posts: 66
|
Thanks again Marcus.
1) So really I should change EVERY file that lists a reference to an old theme, right?
2) Will this happen automatically if I were to make the duplicate file from within Visual Studio?
3) Are there certain settings I need to adjust withing Visual Studio before I connect?
|
|
|
|
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.