SharePoint搜索中心问题

时间:2010-03-10 08:57:20

标签: c# sharepoint-2007 windows-server-2008

我在Windows Server 2008上将SharePoint Server 2007与协作门户模板一起使用。站点的默认搜索地址指向/SearchCenter/Pages/Results.aspx。有任何想法如何将地址更改为其他地址?编程解决方案或简易配置解决方案都可以。

提前谢谢, 乔治

1 个答案:

答案 0 :(得分:0)

Collaboration Portal使用模板SPSPORTAL#0,它在12 \ TEMPLATE \ 1033 \ XML \ webtempsps.xml中具有以下定义:

<Template Name="SPSPORTAL" ID="47">
    <Configuration ID="0"
        Title="Collaboration Portal"
        Type="0"
        Hidden="FALSE"
        ImageUrl="/_layouts/1033/images/template_corp_intranet.png"
        Description="A starter site hierarchy for an intranet divisional portal. It includes a home page, a News site, a Site Directory, a Document Center, and a Search Center with Tabs. Typically, this site has nearly as many contributors as  readers and is used to host team sites."
        ProvisionAssembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
        ProvisionClass="Microsoft.SharePoint.Publishing.PortalProvisioningProvider"
        ProvisionData="SiteTemplates\\WebManifest\\PortalWebManifest.xml"
        RootWebOnly="TRUE"
        DisplayCategory="Publishing"
        VisibilityFeatureDependency="97A2485F-EF4B-401f-9167-FA4FE177C6F6">
    </Configuration> 
 </Template>

这意味着SPSPORTAL#0不指向onet.xml中的站点模板,而是使用XML文件来定义要创建的多个站点。这是PortalWebManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<!-- _lcid="1033" _version="12.0.4518" _dal="1" -->
<!-- _LocalBinding -->
<portal xmlns="PortalTemplate.xsd">
    <web name="Home" siteDefinition="SPS" displayName="$Resources:spscore,PortalManifest_Home_DisplayName;" description="$Resources:spscore,PortalManifest_Home_Description;">
        <webs>
            <web name="News" siteDefinition="SPSNHOME" displayName="$Resources:spscore,PortalManifest_News_DisplayName;" description="$Resources:spscore,PortalManifest_News_Description;" />
            <web name="SiteDirectory" siteDefinition="SPSSITES" displayName="$Resources:spscore,PortalManifest_SiteDirectory_DisplayName;" description="$Resources:spscore,PortalManifest_SiteDirectory_Description;" />
            <web name="SearchCenter" siteDefinition="SRCHCEN" displayName="$Resources:spscore,PortalManifest_SearchCenter_DisplayName;" description="$Resources:spscore,PortalManifest_SearchCenter_Description;" />
            <web name="Docs" siteDefinition="BDR" displayName="$Resources:spscore,PortalManifest_DocumentCenter_DisplayName;" description="$Resources:spscore,PortalManifest_DocumentCenter_Description;" />
        </webs>
    </web>
</portal>

您可以使用自定义PortalWebManifest.xml创建自定义网站定义,该自定义PortalWebManifest.xml包含您要使用的SearchCenter以外的名称。或者,由于PortalProvisioningProvider除了基于传入其中的XML创建站点之外没有其他功能,因此您可以使用PortalWebManifest.xml作为指南并编写代码来创建站点的方式和位置。