AvailableWebTemplates Key Format? - bernado |
08-Feb-07 11:44:02
|
Ok, so I figued it out...
If anyone else out there is struggling with this hopefully this will help:
To provision a top level site, and, restrict the sub sites that can be
created from that top level site using the SP UI, use the following format:
Property Key="AvailableWebTemplates"
Value="*-[siteDef];*-[siteDef],*-[siteDef]"
The syntax is weird, and it took me a bunch of trial and error to figure
this out, but, it works great. If anyone out there knows where some
additional documentation on this can be found, please reply to this post. I
couldn't find it anywhere. |
 |
| |
AvailableWebTemplates Key Format? - JRos |
08-Feb-07 03:07:01
|
I'm trying to accomplish the same thing - but I'm having trouble figuring out
where to begin with creating a new Publishing Site Definition. There are
several examples of how to do this with the Team Site Definition. Can you
help to fill in the blanks about how you do this for the Publishing Site?
You are right, this information is very tough to come by! Any help would be
most appreciated! |
 |
| |
AvailableWebTemplates Key Format? - bernado |
08-Feb-07 03:23:02
|
Yep, I found the same type of STS stuff, not what I was looking for either.
The Publishing site (as you no doubt have discovered) seems to use leverage
about every method known to the MOSS world to create its self. So, I started
by trying to follow the tracks through the labrynth of XML files to figure
out what was happening. Basically is goes like this:
in webtempsps.xml there is a "BLANKINTERNETCONTAINER" template that uses the
PortalProvider. The provider uses the InternetBlank.XML file listed in the
template to call other site templates (there is some information on this
which I found later in the MOSS SDK, get that, it is helpfull and free) to
provision all the stuff at once.
Using that information, I copied/pasted the "BlANKINTERNETCONTAINER" site
def and renamed my site defs as needed. Then I added a custom
WEBTEMP-MYSITEDEFS.XML file to the 1033 dir so MOSS would find my new site
defs which included a new template also using the portal provider (just
copied/pasted the code and changed where necessary and created my own
InternetBlank.xml file).
From there I began picking through each propery and tweaking stuff that I
need to change in the ONET.XML files in my new site defs.
If you need more info, hit me off the list at:
bernie DOT johnsen AT cudenver DOT edu |
 |
| |
AvailableWebTemplates Key Format? - sorgy.publi |
15-Mar-07 11:45:43
|
See
Microsoft.SharePoint.Publishing.PublishingWeb.SetAvailableWebTemplates
using Reflector
AvailableWebTemplates Key Format is:
LCID-[sitetemplatename][#sitetemplatenumber];LCID-[sitetemplatename]
[#sitetemplatenumber];LCID-[sitetemplatename][#sitetemplatenumber]
1033-BALANKINTERNET#1;1049-BALANKINTERNET#1;*-BALANKINTERNET#2
*-BALANKINTERNET#2 - ALL Languages |
 |
| |
AvailableWebTemplates Key Format? - bernado |
15-Mar-07 12:23:16
|
Great stuff. Thanks!
Were'd you find this information? I looked about everywhere I could think,
including the SDK (I think), and I didn't see this. Maybe it is a newer
edition of the SDK?
Thanks again for posting this, the "*-" syntax makes sense to me now.
B |
 |
| |
AvailableWebTemplates Key Format? - sorgy.publi |
15-Mar-07 12:32:01
|
I was looking for this information for 3 months. And I've found this
just 30 minutes ago. Only reflector help me some time. There is no
information about this in SDK (as usual). |
 |
| |
Site Def - Parthi |
26-Jun-07 01:59:05
|
Hi,
I added this part to MySiteDef that I created from STS Site def and it seems to work fine (please let me know if I am wrong). I did not create from BLANKINTERNET site def.
The only problem is that i have a default.aspx page in root (from STS site def), but the site gets redirected to pages/default.aspx as home page since it includes this publishing feature.
Other than that i have all the custom lists i added in MySiteDef available.
Am i missing some thing here?? |
 |
| |
Site Def - bernado |
26-Jun-07 02:30:00
|
...
...
I haven't tried this, but, I suspect that is what you are looking for.
Good Luck. Let us know if it works!
Bernadou |
 |
| |
Site Def - bernado - **** **** |
27-Jun-07 02:13:54
|
Bernado,
It does work!! (Hopefully no hidden problems)
Newly created site out of this site def. has publising features, and also it has Basic Site Tempalate files.
This is feature node i added in cofiguration section on onet.xml for a team site with some custom webparts in default.aspx
<Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416">
<Properties>
<Property Key="AlternateCssUrl" Value="~SiteCollection/_styles/core.css" />
<Property Key="WelcomePageUrl" Value="default.aspx" />
<Property Key="AvailableWebTemplates" Value="*-MySiteDef#0" />
</Properties>
</Feature>
interesting this here is that since in specified "WelcomePageUrl" as a property, SharePoint did not create a default.aspx publishing page in "Pages" document library. It used the default.aspx created from Team Site as welcome page! All the default Lists and document libraries are created for publishing site, but nothing in them.
My default.aspx page (with my cusom webparts) from Team Site is now the default page for my site.(which is what i wanted). Great!!!
One more good thing here is that users can select only one site from Site Creation page from this current site and all its subsites.("AvailableWebTemplates" property). Again great !!!
Now i also have the flexibiliy to do conditional site creation template to show for users for different sites (using "AvailableWebTemplates" property for different sites)!!
but now the problem for me is to restrict users from creating Meeting Workspace from Event list. Since the site is from "Team Site" site def., Meeting Workspace creation page shows all the out-of-box available WS sites.
Any one has any idea to go further from here?
Thanks
Parthi |
 |
| |
Site Def - bernado - bernado |
27-Jun-07 06:16:02
|
Very cool. Glad that worked for you...
If I understand what you want to do, it seems like you now want to do this...
You can globally hide any site definition (but this will apply to all web
apps on this box if you do this...) by setting the Hidden="False" property to
true in the webtemp.xml file for the site def you want to hide.
So, MS owns certain things in the SP, and, they reserve the right to
overwrite your changes if you decide you are going to mess with them when
they release a service pack, so, I made a copy of the webtemp.xml file,
called it webtemp-hide.xml and put it in the same directory
...12\TEMPLATE\1033\XML. I then changed the Hidden key to true
(Hidden="True") for any site def I didn't want to be available ever (we have
a fairly controlled environment).
You'd probably want to do this...
ImageUrl="/_layouts/images/mwsprev.png" Description="A site to plan,
organize, and capture the results of a meeting. It provides lists for
managing the agenda, meeting attendees, and documents."
DisplayCategory="Meetings" > </Configuration>
Good Luck!
B |
 |
| |
Site Def - **** **** |
02-Jul-07 11:38:49
|
Thanks for the suggestion, but i can not do that since we are in a shared environemnt. :(
I also noticed that even you restrict the available Work Space (Meeting) templates for subsites using "Page layouts and site templates", creating a Work Space from a Events list on the same site is not working.
This seems wrong though. Is this a know BUG?? Can you please give your insight on this??
Thanks
Parthi |
 |
| |