Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to keep my code as organized as possible, and in doing so wanted to create sub sites (sub projects) that contain their own page layouts and web parts etc. Is it possible for me to put these items into a feature that is to be activated on a sub site instead of the root site?

So far all of my attempts at this have failed. Using the same module xml that I have been using for the root site, I don't get any errors, but I also don't get my files added to the master pages or web parts catalogs.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="MyProjectGroupsPageLayouts" Url="_catalogs/masterpage" Path="PageLayouts">
        <File Url="MyProjectGroupsWebPartPage.aspx" Type="GhostableInLibrary">
            <Property Name="Title" Value="My Project Groups Webpart Page" />
            <Property Name="MasterPageDescription" Value="My Project Groups Webpart Page which is a two column layout with secondary column on the left." />
            <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
            <Property Name="PublishingAssociatedContentType" Value=";#MyProject Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39008de149b2ef494b4db10b5c475493897b;#" />
        </File>
    </Module>
</Elements>
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

No you can't. The Web Part and Master Page galleries are site collection scoped.

share|improve this answer
    
Thanks for the confirmation, this is pretty much what I thought, but I had hoped I was wrong. –  TehOne Nov 30 '11 at 21:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.