I wanted to make a new page for my store, but find myself continually doing this. Is there a way I can create one page and have it reused by the scriplets? So for example, I create a Static.aspx. Then I can navigate to it like:
http://mydomain.com/static.aspx?scriptlet=aboutus
http://mydomain.com/static.aspx?scriptlet=references
http://mydomain.com/static.aspx?scriptlet=events
Any ideas on how to do this?
Reuse aspx page for multiple pages using url parameters?
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Reuse aspx page for multiple pages using url parameters?
If you are talking about just different content on the page, you can add a webpages in the admin under a particular category and reuse the display page the way you do the product display page.
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: Reuse aspx page for multiple pages using url parameters?
Sure - as long as you implement AbleCommercePage.
I load an alternate "Landing Page" based on a database setting, with a small modification to default.aspx...
Here's the content tag in my default.aspx:
and the code that manipulates it:
You'd be capturing, parsing or logically assigning the scriptlet name from Request.Querystring, and setting ScriptletPartId.Content as that value...
I load an alternate "Landing Page" based on a database setting, with a small modification to default.aspx...
Here's the content tag in my default.aspx:
Code: Select all
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="PageContent">
<cb:ScriptletPart ID="HomePage" runat="server" Title="Home Page" AllowClose="False" AllowMinimize="false"
Layout="HomePage"
Header="Toolbar Only Header"
Content="Home Page"
Footer="Standard Footer" />
</asp:Content>
Code: Select all
public partial class Default : CommerceBuilder.Web.UI.AbleCommercePage
{
protected void Page_Init(object sender, EventArgs e)
{
if (SiteInformation.Current.Properties.ContainsKey("LandingPage"))
{
string landingPage = SiteInformation.Current.Properties["LandingPage"].ToString();
if (landingPage.Contains("/"))
Response.Redirect(landingPage);
else
this.HomePage.Content = landingPage;
}
}
}
Nick Cole
http://www.ethofy.com
http://www.ethofy.com
Re: Reuse aspx page for multiple pages using url parameters?
Perhaps in this situation where display would be same just different contents so making use of web pages would be better.