AvailableWebTemplates Key Format? - bernado

07-Feb-07 04:47:11
I'm attempting to setup a custom Publishing site definition.  I've
successfully created the site def and added it to the webtemp*.xml area,
setup the provisioning provider, etc.  Everything worked just great to get
started with basically copied code from BlankInternet and Publishing site
defs with just tweaks to the names and ID's where necessary.

So, my question is fairly simple, but,  simply can't find this information
anywhere (not the MOSS SDK, nowhere on MSDN, in the wild, etc).

The following format seems to block all subweb site defs from showing in the
available Site Templates in a Publishing Portal:

Property Key="AvailableWebTemplates" Value="*-CUSTOMBLANKINTERNET#2"

So, what format is needed to allow more than one site to be selected?

I've tried several combinations and delimiters, but all of them seemed to
result in all hidden=false sites being visible.  Not what I had in mind...
;-)

Thanks all,
B
reply
 
 

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.
reply
 

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!
reply
 

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
reply
 

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
reply
 

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
reply
 

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

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??
reply
 

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
reply
 

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
reply
 

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
reply
 

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
reply
 
Upgrading Windows SharePoint 2003 with LCS on the server
promotion
Silverlight    WPF    WCF    WWF    LINQ   
JavaScript    AJAX    ASP.NET    XAML   
C#    VB.NET    VB 6.0    GDI+    IIS    XML   
.NET Generics    Anonymous Methods    Delegate   
Visual Studio .NET    Expression Blend    Virus   
Windows Vista    Windows XP    Windows Update   
Windows 2003 Server    Windows 2008 Server   
SQL Server    Microsoft Excel    Microsoft Word   
SharePoint    BizTalk    Virtual Earth   
.NET Compact Framework    Web Service   

"Everything" RSS / ATOM Feed Parser
How to send and receive messages through message queuing in .Net
How to Read text file as database
SQL Server 2005 Paging Performance Tip
Display code of web page.
Fully Scalable Excel File Importer class for .net using Microsoft Jet driver
Generic Chart Color Manager class that can be used for any charts
Helper class to style the infragistics wingrid
Using Reflection to detemine as Assembly Info in and out.
Helper class to play with Window (Owners and position)
Resolving displayname from the culture using the XmlLanguage and LanguageSpecificStringDictionary class