웹 템플릿을 만드는 후 PageTitle이 숨겨져있게됩니다. onet.xml에서 pageTitle에 액세스 할 수 있습니까?

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/88561

  •  10-12-2019
  •  | 
  •  

문제

나는 웹 템플릿 을 만들었지 만 onet.xml 파일 주위의 머리를 꽤 많이받지 못했습니다.나는 사용자 정의 웹 파트를 추가했으며 기본적으로 사람들이 onet.xml 파일의 <Configuration> 부분에서 하나가 구성 할 것을 제안하는 대부분의 것들을 수행했습니다.

사용자 정의의 모든 작업은 하위 사이트를 만들 때 웹 템플릿을 사용할 수 있습니다.하위 사이트가 생성 될 때 문제가 발생합니다.

문제 : 사이트가 생성되었지만 페이지의 제목이 표시되지 않습니다.

크롬 dev 도구를 사용할 때 :

여기에 이미지 설명을 입력하십시오

onet.xml 파일을 #sts onet.xml (팀 사이트 템플릿)로 변경할 때 제목이 표시됩니다.

question : 나는 onet.xml 파일에 의해 제목이 (in) 제목이 영향을 미치는 이유를 알아낼 수 없습니다. 페이지 제목은 onet.xml 파일의 <NavBars> 영역에 "added"입니다.

도움이 되었습니까?

해결책

<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server">
         <label class="ms-hidden"><SharePoint:ProjectProperty Property="Title" runat="server"/></label>
</asp:Content>

This is a snippet from default.aspx in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\SiteTemplates\sts

As you can see, this default page has put the ms-hidden class on the title label. This class has CSS bound to it by default that hides it.

So either you have to create your own default.aspx and provision it, using the markup from C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\SiteTemplates\sts\default.aspx and remove the ms-hidden from the tag. (See here for details about how to provision the default page)

Or you could probably remove the class from the tag with the help of javascript (but that seems a bit overcomplicated and dirty)

다른 팁

jQuery("label").removeClass("ms-hidden");
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top