I was pushed to replace the default search box in a site collection with a customized one. At the moment it looks like this:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Control
Id="SmallSearchInputBox"
Sequence="23"
ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx" ControlAssembly="Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<!--Advanced Search Link-->
<Property Name="ShowAdvancedSearch">true</Property>
<Property Name="AdvancedSearchPageURL">_layouts/xyz/SupplierPhonebook/AdvancedSearch.aspx</Property>
<!--Search Options-->
<Property Name="SearchResultPageURL">_layouts/xyz/SupplierPhonebook/AdvancedSearch.aspx</Property>
<Property Name="QueryPromptString">Nach Ansprechpartner suchen...</Property>
<Property Name="UseSiteDefaults">true</Property>
<Property Name="ScopeDisplayGroupName"></Property>
<!--Layout Options-->
<Property Name="SearchBoxTableClass">search-box</Property>
<Property Name="GoImageUrl">/_layouts/images/gosearch15.png</Property>
<Property Name="GoImageUrlRTL">/_layouts/images/gosearchrtl15.png</Property>
<Property Name="GoImageActiveUrl">/_layouts/images/gosearchhover15.png</Property>
<Property Name="GoImageActiveUrlRTL">/_layouts/images/gosearchrtlhover15.png</Property>
<Property Name="DropDownMode">HideScopeDD</Property>
<Property Name="FrameType">None</Property>
</Control>
</Elements>
By default it works, but only at the default page of the site collection. So when I first enter a other page, list, application page etc. pp the link is wrong.
Than it looks like this:
or like this when I'm performing a search
I have tried mostly all url tokens (~Site, ~SiteCollection, ~site.. etc.) Nothing works. I can't implement a fixed url cause the application will be tested on serveral servers with different urls.
So what I need is to know how I could redirect the AdvancedSearchPageURL and SearchResultPageURL allways to a page like this: http://{SERVER}:{PORT}/{SITECOLLECTION}/_layouts/xyz/SupplierPhonebook/AdvancedSearch.aspx
The problem with the url tokens is, that they dont get translated :\
Thx alot
Best Regards
Jan