Add content to a masterpage placeholder in a specific site template
-
29-11-2019 - |
Question
I have a master page which is a customized copy of v4.master. I want to add some content to a the placeholder called PlaceHolderQuickLaunchBottomV4:
<SharePoint:UIVersionedContent
UIVersion="4"
runat="server"
id="PlaceHolderQuickLaunchBottomV4">
<ContentTemplate>
<ul class="s4-specialNavLinkList">
<li>
<SharePoint:ClusteredSPLinkButton
runat="server"
NavigateUrl="~site/_layouts/recyclebin.aspx"
ImageClass="s4-specialNavIcon"
ImageUrl="/_layouts/images/fgimg.png"
ImageWidth=16
ImageHeight=16
OffsetX=0
OffsetY=428
id="idNavLinkRecycleBin"
Text="<%$Resources:wss,StsDefault_RecycleBin%>"
CssClass="s4-rcycl"
PermissionsString="DeleteListItems" />
</li>
I can a <li> element to this placeholder directly in the masterpage and it works fine. But actually I am wondering how to do add this additional content only in one specific site template, one of my configurations in onet.xml.
La solution 2
Create a delegate control in the master page. Then add content in a module to the site template in a feature.
I accept my solution. If someone finds a better solution, I'll accept it.
Autres conseils
- Create a sitecollection feature who will provision your masterpage. You can use a module for this purpose.
- Add a feature reference in your onet.xml
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange