Setting "SearchPage"


I'm working on a part of the site that performs a search to a database outside our EPiServer site and I've got a problem redirecting to the "SearchPage". I'd like to use the method used in the template package where this code is used to get the URL to the search page:

        public string SearchPageUrl
                if (_searchPageUrl == null)
                    PageReference searchPageRef = CurrentPage["SearchPage"] as PageReference;
                    if (searchPageRef != null)
                        PageData searchPage = GetPage(searchPageRef);
                        _searchPageUrl = searchPage.LinkURL;
                return _searchPageUrl;
            set { _searchPageUrl = value; }

It's CurrentPage["SearchPage"] that gets me confused. I'd like to make another page a sort of search page so that I could redirect to CurrentPage["MyCustomSearchPage"] but I can't figure out where this is done. Where is it declared wich page is the SearchPage?

Best regards

Jan 08, 2010 11:22

Hi Peter.

The "SearchPage" property is a Dynamic property in the Public Template package.

Hope this helps!

Br, Tore Gjerdrum


Jan 08, 2010 11:47

I've look for where it's assigned but I can't seem to find where. To make it simple: if I'd like to change the page to where it SearchPage points, where would I do that?

Jan 08, 2010 11:52

Hi again,

If I understand you correctly, you want to change the page that the Property "SearchPage" points to? This is done in Edit mode. Click the "Edit dynamic properties" button. Here you can change the page in the "Search page" property.

Sorry if I am misunderstanding you again.


Jan 08, 2010 13:16

I completely forgot about that button. Thanks a million!

Jan 08, 2010 13:23
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.