有關SharePoint頁面定製的若干細節 Tip 1

來源:互聯網
上載者:User
 

有關SharePoint頁面定製的若干細節

 

Tip 1: 改了Logo,怎麼還是沒變呢?!

預設提供的“發布門戶”類型的網站中,即使你在網站設定裡,將網站表徵圖換成其他的圖片,但在前台的展示頁面,卻永遠不會顯示你替換的那張,它依然不變!問題是,你在背景管理頁面,居然可以看到它,你換上去的logo。而前台怎麼就不變呢?

下面,我們來找原因。

首先,用Designer開啟網站,開啟前台頁面所引用的主版頁面。

開啟程式碼檢視,找到如下代碼:

可以看到,主版頁面中居然用了AspMenu控制項來顯示logo!!

這就是為什麼,我們在後台換了logo之後,後台能看到換上去的logo,而前台卻沒變的原因。

因為後台所更改的logo地址設定,只會在SharePoint的SiteLogoImage控制項上奏效!如下:

<SharePoint:SiteLogoImage id="onetidHeadbnnr0"LogoImage Url="/_layouts/images/titlegraphic.gif" runat="server"/>

 

l   下面,有兩個方法可以實現我們的logo顯示。

方法1:

當然就是直接把aspmenu控制項注釋掉,然後加上我們的sitelogoimage控制項啦!

方法2:

按住“Ctrl”,點“logo”的css引用。

簽出band.css檔案後,我們看見代碼如下:

發現,原來已經在css裡面將這一圖片串連給定死了!!!

OK,到此,我們的第二個方法也出來了,修改此串連,讓它導向我們正確的logo圖片。

 

PS:Service SDK上還附有另一方法

To customize logos used on home pages of SharePoint sites

1.     Open the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\IMAGES directory.

2.     Copy the images that you want to appear on the home pages of your Web sites to this directory.

3.     Remove the image files TITLEGRAPHIC.GIF and HOMEPAGE.GIF, which contain the logos used on the left and right sides of the home page, respectively.

4.     Rename the new image files TITLEGRAPHIC.GIF and HOMEPAGE.GIF.

All sites now display new logos on their home pages.

Caution:

The image files that you add may be overwritten when you install updates or service packs for Windows SharePoint Services, or when you upgrade an installation to the next product version.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.