Frage

Anforderung: WebTemplate mit benutzerdefinierten Dokumentenbibliotheken sowie benutzerdefinierte Inhaltstypen, die in SharePoint 2013 online verwendet werden sollen

Erstellt die Webvorlage und den Inhaltstyp, beide arbeiten in Online-SharePoint in Ordnung. Aber ich bin mit der Listendefinition zwei wichtige Probleme mit der Listendefinition konfrontiert

1) Der benutzerdefinierte Inhaltstyp kann nicht als ContentypeF in das Listenfinitionsschema aufgenommen werden. 2) herauszufinden, wie die Liste der Listendefinition in die Web-Template Onet.xml aufgenommen wird, versuche ich, die Feature-ID hinzuzufügen, aber beim Erstellen einer neuen Site mithilfe der Vorlage fehlt die Dokumentbibliothek.

Code:

onet.xml generasacodicetagpre.

Teil der Listendefinitionsschema.xml generasacodicetagpre.

Innerhalb von ContentTypes habe ich auch versucht, ContentTypef zu verwenden, aber auch nicht funktioniert

Content Type Element.xml generasacodicetagpre.

Kann jemand vorschlagen, was ich falsch mache?

Nur wenige Ding, alle drei Dinge (WebTemplate, Inhaltstyp- und Listendefinition) sind in derselben Funktion enthalten, die in der Site überbaut wird, da ich sie mit der sandkastengeschenken Architektur sandboxen in SharePoint-Architektur einsetzen kann.

War es hilfreich?

Lösung

I'd like to suggest you restructure your code a bit if I may. Put the web template in its own solution. Get that working first.

Then create a second solution that includes the content type and list. Its feature should be scoped to Web, not Site. I don't see any issues with your schema, and VS2012 in any case has a list designer wizard, and if you used that you should be OK.

The reason I am suggesting 2 solutions is because web templates complicate the development workflow. Redeploying it entails deleting and recreating the whole site. There's no need to do that if you're only working on the list. With your list in a separate solution your redeployments will go much quicker.

If you need everything in one solution you can put them back togather once everything is working, but you need to have two features: Your web template must be in a Site-scoped feature, and your list needs to be in a Web-scoped feature. The fields and content type, I think, might be OK in either scope but I've always made them Web scoped.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange
scroll top