Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Search result View modes: 
User avatar
Member
Member
gary.chan-e-crusade - 7/17/2009 4:04:48 AM
   
Search result
Hi,

How to display all record when i am using "search result " webpart?

e.g.?searchtext=ALL&searchmode=AnyWord

Thanks

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 7/21/2009 2:58:41 AM
   
RE:Search result
Hi,

There is no native support for this in Kentico CMS. However, you can create your own web part with this search result control and also with repeater control. You repeater control will be configured the same way your search result control. You have to manage create query string searchtext=ALL if user searches for empty text. Then you would check this query string in code behind of your web part (search result + repeater) and if query string searchtext equals to ALL, then you would display your repeater and hide your search result control.

Best Regards,
Miroslav Remias

User avatar
Member
Member
gary.chan-e-crusade - 7/21/2009 7:22:44 AM
   
RE:Search result
Would you mind provide some coding sample for reference?
It is difficult to combine both web part into one with customsization.

Thanks

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 7/28/2009 6:28:07 AM
   
RE:Search result
Hello Gary,

Unfortunately, we do not have any sample codes for this specific purpose.

You would add the two mentioned controls to your new control and then manage their visibility property in the code behind. You could add a condition for example in the Page_Load method like this (both controls would be invisible by default):
if (Request.QueryString["SearchText"] == “ALL”)
{
SearchResultControlID.Visibility = true;
}
else
{
RepeaterControlID.Visibility = true;
}


Best regards,
Helena Grulichova