PageSearch disregarding PageLinkProperty

Vote:
 
Hi! I have a newly upgraded 4.62b site and I have recently found a strange behavior with PageSearch. When using PageSearch it seems to disregard the PageLinkProperty set, and searches from the default PageLink i.e. the startpage. The code: " maincatalog="<%# CurrentPage["MainCatalog"] %>" pagelink="<%# Configuration.StartPage %>" pagelinkproperty="MainContainer"> The MainContainer property is set on the page where I want the search to begin. Have I missed something else? Some new variables that needs to be changes or set? Any ideas to why it doesn't work?
#13338
Mar 25, 2008 18:36
Vote:
 
In my application listingnode field name is "ListingContainer". What you however should do is first check whether your property exists: CurrentPage.Property.Exists("MainContainer") in code-behind or <% =CurrentPage.Property.Exists("MainContainer").ToString() %> in front file (aspx, ascx). and secondly whether there's actually a value in it: CurrentPage["MainContainer"].ToString()in code-behind or <% =CurrentPage["MainContainer"].ToString() %> in front file (aspx, ascx). - Goran
#15614
Mar 25, 2008 18:47
Vote:
 
I think if you don't specify the PageLink value it should work as expected. I'm not sure what happens when you specify both PageLink and PageLinkProperty - the control may use both, in which case it will appear as if you're searching from the start page whatever value you specify for PageLinkProperty. Hope this helps, Mark
#15615
Mar 25, 2008 18:47
Vote:
 
MainContainer is set and has the correct pagenumber id. Thanks for that tip. The search works if I remove PageLink just as you said. But I thought that PageSearch just used PageLink, if PageLinkProperty was not set. For now I solved the problem by removing PageLink and demand that MainContainer is set. I'll continue my search for a solution where both values are set. Thanks!
#15616
Mar 25, 2008 18:47
Vote:
 
Correct me if I'm wrong, but if both PageLink and PageLinkProperty are empty EPiServer will use Configuration.StartPage? That means that if you don't define pagelink at all and the page editor don't set the MainContainer property then PageSearch will use Configuration.StartPage automatically. This used to be the case anyway...
#15617
Mar 25, 2008 18:47
Vote:
 
You are so right! The PageLink then, is only necessary when you don't want the StartPage as a fall back solution when the PageLinkProperty is not set, but yet another page. (If you can make it work that is =) Thanks!!
#15618
Mar 25, 2008 18:47
* 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.