Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 6 of 6

Thread: Custom Template for search.aspx

  1. #1
    bradhh is offline Junior Member
    Join Date
    Feb 2009
    Posts
    12

    Default Custom Template for search.aspx

    Is it possible to create a custom template for search.aspx? Since it's not an entity page, I'm not sure where to start with that.

    Thanks -
    Brad

  2. #2
    mgibbs is offline Senior Member
    Join Date
    Jan 2005
    Location
    Orange County, CA
    Posts
    194

    Default

    If you have template switching turned on (AppConfig Template.Switching set to true) , you could add a new appconfig called templatesearch.aspx with a value that is the filename of the new search template (search.ascx perhaps?).

    We are currently doing this for a number of different pages on a client's site and it works great. I THINK this has been available since the mid to late 7 series of ML.

    Good luck!
    EMM for AspDotNetStorefront - Communicate effectively with your customers

  3. #3
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Create a new template to use for the search.aspx page, let's say for instance mysearchtemplate.ascx), then add a new AppConfig parameter called Templatesearch.aspx and set its a value to the template you created (mysearchtemplate.ascx.) You can use this technique on any pages of your site.

  4. #4
    data77 is offline Member
    Join Date
    Oct 2010
    Posts
    75

    Default

    then how do u link it back to your pages search.aspx
    Eat my code!
    Multistore V 9 sp1
    Best Hosting for your storefront Business in 2011

    http://fasoservice.com
    world wide directory submission
    http://Nanalist.com
    Burkina24 Media news in Burkina Faso
    http://burkina24.com

  5. #5
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    The software will do it automatically for you once you navigate to a different page. Sounds pretty nice, right?

  6. #6
    matrix is offline Junior Member
    Join Date
    Oct 2008
    Posts
    12

    Default can't set a different template for search page

    Hello,

    First, I set TemplateSwitching.Enabled variable to "true".
    I add a new AppConfig Variable (newsearch.aspx and newsearch.ascx). Then i create a newsearch.ascx under my skin folder and copy all code from template.ascx file and change a few things. then create a page newsearch.aspx under root (this is copy from searchadv.aspx). But when we run this page in browser it fetches template.ascx file not newssearch.ascx.

    thanks.