- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
Figure 6-15. ctypeswss.xml feature in Font
Figure 6-15. ctypeswss.xml feature Data Matrix ECC200 Drawer In None Using Barcode printer for Font Control to generate, create DataMatrix image in Font applications. www.OnBarcode.comPrint Code 128 Code Set C In None Using Barcode creator for Font Control to generate, create USS Code 128 image in Font applications. www.OnBarcode.comCHAPTER 6 WHAT LURKS IN THE FOREST OF LISTS
Printing EAN / UCC - 13 In None Using Barcode generator for Font Control to generate, create EAN128 image in Font applications. www.OnBarcode.comEncoding Barcode In None Using Barcode generator for Font Control to generate, create Barcode image in Font applications. www.OnBarcode.comThe important thing here is the XmlDocuments element in the content type with ID 0x01. That content type is the Item content type, and as you can see, there are three form templates for the three modes of a form, Display, Edit, and New. I will not go too far into content types here (I still need you to read the next chapter!), but I will reveal that every other content type inherits from the Item content type. And, since all properties are also inherited, the form templates defined in Item will be inherited by child content types if they do not define their own form templates. QR Generation In None Using Barcode creation for Font Control to generate, create QR Code 2d barcode image in Font applications. www.OnBarcode.comDrawing PDF417 In None Using Barcode generation for Font Control to generate, create PDF 417 image in Font applications. www.OnBarcode.com Note You may also see that there is a system content type, with ID 0x. Strictly speaking, every content Painting GS1 - 13 In None Using Barcode drawer for Font Control to generate, create EAN13 image in Font applications. www.OnBarcode.comGenerating USPS POSTNET Barcode In None Using Barcode maker for Font Control to generate, create Postnet 3 of 5 image in Font applications. www.OnBarcode.comtype inherits from System. The only thing System defines is the very existence of an item, the ContentType column, which tells the item or document that it is a content type. Perhaps this is the creation myth of SharePoint. In the beginning was System, and System was 0x. Generate Data Matrix In Objective-C Using Barcode creator for iPad Control to generate, create Data Matrix image in iPad applications. www.OnBarcode.comPainting Data Matrix 2d Barcode In Visual Basic .NET Using Barcode generation for VS .NET Control to generate, create Data Matrix ECC200 image in .NET framework applications. www.OnBarcode.comFinding the form templates is an important step on the way, but we still do not know where these templates live. To find them, you can do what I did and search the entire [12] for the string ListForm, eventually finding the right place, or, if you remember from 5, you can check to see whether this is actually a control template. Open the DefaultTemplates.ascx file that is in [12]\TEMPLATE\CONTROLTEMPLATES. Scroll down keep scrolling a bit more there! Did you see it Around line 104 you will find a RenderingTemplate bearing the wonderfully familiar name of ListForm, just like the form template in the Item content type. Eureka! We found it! Not just that, but knowing that we can override the control template (see 5 if you don t remember) means we can completely customize any content type form to fit our needs. No more editing hundreds of list forms to modify the user experience; we can add or modify everything from a single file, just the way we want. Now you know why I called list forms powerful. Still, we may want more. What if we do not want to modify everything but just add a nice display form to a news article content type Well, knowing what we now know and having seen what we have seen, we can simply do something like the following to override the default form templates for our own content type: <ContentType ID="0x01002ABA7C4C55F148068095A2E536A5069D" Name="News article" Group="$Resources:List_Content_Types" Description="Publish new news article" Version="0"> <XmlDocuments> <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms"> <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms"> <Display>ListForm</Display> <Edit>MyOwnEditForm</Edit> <New>ListForm</New> Barcode Drawer In Java Using Barcode maker for Eclipse BIRT Control to generate, create Barcode image in BIRT applications. www.OnBarcode.comEncode Barcode In VS .NET Using Barcode drawer for ASP.NET Control to generate, create Barcode image in ASP.NET applications. www.OnBarcode.comCHAPTER 6 WHAT LURKS IN THE FOREST OF LISTS
Draw PDF417 In Java Using Barcode maker for Java Control to generate, create PDF 417 image in Java applications. www.OnBarcode.comGenerate UPC Symbol In None Using Barcode creation for Microsoft Excel Control to generate, create GTIN - 12 image in Excel applications. www.OnBarcode.com</FormTemplates> </XmlDocument> </XmlDocuments> </ContentType> Notice the MyOwnEditForm form template. Of course, we would have to actually create the template, which we would do by creating an .ascx file in the [12]\TEMPLATES\CONTROLTEMPLATES directory and adding a rendering template with an Id attribute matching our Edit form template name. Let s take this a bit further with a tip. You can change the form template of a content type even after you have deployed the content type. Not just that, but you can change the form template for a given content type in a given list without affecting every other copy of the content type. To do so, you need to edit the content type on the list using a tool such as SharePoint Manager 2007. You could write your own code to do the exact same thing as well. The reason why this very cool feature works is that content types get copied to the list when they are deployed. You will explore this more in 8, but just know that a content type on a list is a copy, not the master. I will demonstrate with a simple exercise: 1. Start by creating two identical task lists. If you use the site structure we created in 1, just add another task list to your root site. 2. Create a custom form template to use for one of the task lists: a. Create a new .ascx file in [12]\TEMPLATE\CONTROLTEMPLATES. Call it whatever you like; I used MyCustomListForm.ascx. b. Copy the ListForm rendering template tag from DefaultTemplates.ascx, including the start and end tags. Remember to include the Control, Assembly, and Register tags from the start of DefaultTemplates.ascx. c. Edit your new rendering template ID to something else, for instance MyCustomListForm. Also, make some kind of random change so you know that you are viewing the modified template later. d. Save your new .ascx file, and do an IISRESET to ensure the new template is picked up. UPC Code Scanner In None Using Barcode reader for Software Control to read, scan read, scan image in Software applications. www.OnBarcode.comCreate Barcode In Java Using Barcode generation for Java Control to generate, create Barcode image in Java applications. www.OnBarcode.com3. Start SharePoint Manager 2007, and navigate to your site and then to your newly created task list. Code 39 Extended Printer In Objective-C Using Barcode generation for iPad Control to generate, create Code 39 Extended image in iPad applications. www.OnBarcode.comEncode Barcode In Objective-C Using Barcode maker for iPhone Control to generate, create Barcode image in iPhone applications. www.OnBarcode.comPDF-417 2d Barcode Encoder In None Using Barcode printer for Software Control to generate, create PDF 417 image in Software applications. www.OnBarcode.comEncode QR-Code In Java Using Barcode maker for Java Control to generate, create QR Code JIS X 0510 image in Java applications. www.OnBarcode.com |
|