Después de crear una plantilla web, el Pagetitle se oculta, ¿cómo puedo acceder a Pagetitle desde OneT.xml?

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

  •  10-12-2019
  •  | 
  •  

Pregunta

He creado una plantilla web pero no he conseguido mi cabeza alrededor del archivo onet.xml .Añadido algunas piezas web personalizadas y, básicamente, la mayoría de las cosas que las personas sugieren que se configuraría en la parte de <Configuration> del archivo ONET.XML.

Todo el trabajo de la personalización y puedo usar la plantilla web al crear sub situados.El problema se produce cuando se ha creado el Sub Sitio.

El problema: Se ha creado el sitio, pero el título en la página no se muestra.

Cuando use Herramientas de cromo dev:

ingrese la descripción de la imagen aquí

Al cambiar el archivo ONET.XML a la #sts onet.xml (Plantilla del sitio del equipo) se muestra el título.

Pregunta: No puedo averiguar por qué (dónde) se efectúa el título (IN) el archivo ONET.XML. Es el título de la página "Añadido" en el área de <NavBars> en el archivo ONET.XML.

¿Fue útil?

Solución

<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)

Otros consejos

jQuery("label").removeClass("ms-hidden");
Licenciado bajo: CC-BY-SA con atribución
scroll top