Overiding with the ConLib Custom folder doesn't seem to work
Overiding with the ConLib Custom folder doesn't seem to work
There's some good posts about customising pages but I'm having a problem with one assumption - the ConLib\Custom allows new .ascx controls (and their .cs) so they can be referenced fine as [[ConLib:Custom\<filename>]]. This is similar to the Scriplets method.
However, like the Scriptlets, it is anticipated that .ascx files in the ConLib\Custom with the same name as the original one in the base folder will over-ride the original. Eg. a copy of MiniBasket.ascx (with same name) can be modified in the Custom folder so that it doesn't show the Shipping Estimator (visible="false"). Unfortunately, it doesn't seem to kick in, the original with Shipping Estimator still shows! If I make the same change in the original base file, naturally it works and the Estimator doesn't show - great. But I thought that Custom controls with same name will override, which makes backup and future updates much easier.
I tried reloading/recycling the app, stop/start, but no joy. Am I missing something or does this override behaviour not work on ConLib unlike Scriptlets?
Phil
However, like the Scriptlets, it is anticipated that .ascx files in the ConLib\Custom with the same name as the original one in the base folder will over-ride the original. Eg. a copy of MiniBasket.ascx (with same name) can be modified in the Custom folder so that it doesn't show the Shipping Estimator (visible="false"). Unfortunately, it doesn't seem to kick in, the original with Shipping Estimator still shows! If I make the same change in the original base file, naturally it works and the Estimator doesn't show - great. But I thought that Custom controls with same name will override, which makes backup and future updates much easier.
I tried reloading/recycling the app, stop/start, but no joy. Am I missing something or does this override behaviour not work on ConLib unlike Scriptlets?
Phil
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Overiding with the ConLib Custom folder doesn't seem to work
You need to change the code within the files that are used in the Custom folder. For example- Custom added in both these places. You don't need to change the CodeFile= because it's relative to the folder the page is in.
public partial class ConLib_Custom_RegisterDialog : System.Web.UI.UserControl
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RegisterDialog.ascx.cs" Inherits="ConLib_Custom_RegisterDialog" %>
Edit:
You also need to make sure that your scriplet is using ConLib:Custom/RegisterDialog instead of ConLib:RegisterDialog
public partial class ConLib_Custom_RegisterDialog : System.Web.UI.UserControl
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RegisterDialog.ascx.cs" Inherits="ConLib_Custom_RegisterDialog" %>
Edit:
You also need to make sure that your scriplet is using ConLib:Custom/RegisterDialog instead of ConLib:RegisterDialog
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Overiding with the ConLib Custom folder doesn't seem to work
Yes, that's what I said, I am editing the ConLib\Custom .ascx file but it doesn't make any difference!
Have you definately left an original filename.ascx Control the same but changed the ConLib\Custom filename.ascx with same name, which then overrides it? Because it doesn't seem to override on mine. Phil.
Have you definately left an original filename.ascx Control the same but changed the ConLib\Custom filename.ascx with same name, which then overrides it? Because it doesn't seem to override on mine. Phil.
Re: Overiding with the ConLib Custom folder doesn't seem to work
ConLib/Custom controls doesn't override the default ones. You need to update the locations to make use of the new control from custom folder.
Re: Overiding with the ConLib Custom folder doesn't seem to work
Thanks but your edit above has an answer (ie. use conLib\Custom) but the point is - see your thread "Customizing display pages" and Joe's reply (would've posted there but its a longer thread and this is a specific problem):
So back to original question, does it (#4 method) work - because it doesn't seem to on mine? Phil.
His #4 is what should be achievable, but you are recommending dropping down to #5, which means you have to mess about adding the Custom to every ConLib that references the overriding control. Hassle, and from the thread - should be unnecessary.4. You copy a "built-in" user control into ~/ConLib/Custom and make sure the file name is the same as the original. Then you make changes to it.
AC7 will override the "built-in" user control and use the modified copy you placed in ~/ConLib/Custom. The original remains as it was.
5. You create a brand new user control and store it in ~/ConLib/Custom.
You will be able to reference this custom control on any scriptlet page using the format [[ConLib:Custom\<filename>]]. Be sure to reference it without the .aspx extension. It used to require the extension but this was changed when Beta went to RC1.
So back to original question, does it (#4 method) work - because it doesn't seem to on mine? Phil.
Re: Overiding with the ConLib Custom folder doesn't seem to work
#4 will not work. You have to go with #5
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Overiding with the ConLib Custom folder doesn't seem to work
#4 doesn't work, and I don't know if it ever did. I think old Able documentation might have said it worked that way.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Overiding with the ConLib Custom folder doesn't seem to work
Right, phew, glad we sorted that out. Thanks for your help, Phil.
NB: Hope this can be implemented in upgrade mazhar, it would save a lot of fannying around as the underlying idea and method in Scriptlets is an excellent one (ie. auto override)
NB: Hope this can be implemented in upgrade mazhar, it would save a lot of fannying around as the underlying idea and method in Scriptlets is an excellent one (ie. auto override)
