New to umbraco. Have umbraco project in VS2010 through which I run the umbraco admin locally. When creating templates through the admin, the new template appears as a master page in my Masterpages directory. Why is it that when I create a new document type through the admin, those do not appear as .cs pages in the DocumentTypes directory like I see them existing in projects that have already been created? Hate feeling like such a noob...
Document types are stored as database structures, and are not classes - even though they behave as such with property inheritance. To get a strongly-typed document type as a CS file for use in your code, though, you can right-click any document type and select "Export to .NET", which lets you save a CS file to your hard disk which you can then use in Visual Studio.
Edit: Another resource that you may find useful is http://our.umbraco.org/wiki/reference/api-cheatsheet/linq-to-umbraco/generating-classes-from-document-types - which explains how you can source-control some aspects of your document types using the LINQ2Umbraco library. However, as with all CMS systems, the safest methods fro preserving both structure and content are a) saving your genscripts for your DB to your source control system, b) backing up the DB and saving the BAK file into source control, or c) look at RedGate SQL Source Contol for a professional tool for source-controlling your database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With