Try our conversational search powered by Generative AI!

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
Jan 28, 2008 13:27
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
Jan 29, 2008 12:08
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
Jan 29, 2008 13:05
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
Jan 30, 2008 9:03
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
Feb 01, 2008 8:43
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
Feb 06, 2008 11:48
* 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.