Question 19
You create a feature extends er.
You need to hide the Quick Launch navigation bar of a Sharepoint site.
What shoshould you use?
A. the hidden property of each list
B. The navigation. quicklaunch. Parent. isvisible Property
C. The onquicklaunch property of each list
D. The quicklaunchenabled Property
Resolution:
This question is intended to hide the Quick Launch navigation bar on a Sharepoint site,
According to question18, option D is the answer we need.
Question 20
You create a feature.
You need to add an item to the context menu of a list.
Which type of element shocould you use?
A. A customaction
B. A listinstance
C. A listtemplate
D. A Module
Resolution:
This is an operation on the context menu. A Custom Action (defined as a customaction element section) can be added to the XML document (this XML document is part of the feature definition), as shown in the following example:
< Customaction ID = "Sptest. custommenuitem. buttonclicked" Registrationtype = "List" Registrationid = "101" Location = "Editcontrolblock" Imageurl = "/_ Layouts/images/doclink. GIF" Sequence = "301" Title = "Click me! " Description = "Shows an alert message for this menu item ." > < Urlaction URL = "Javascript: Alert ('Hello world! ');" /> </ Customaction >
This is a typical regim context menu item definition. The registration type indicates when this context menu will appear (in this example, this context menu can be used when the list is selected ). next, we will define what operations will be performed on this menu item. So the answer is option.
Option B. listinstance is used to create a list instance, which has nothing to do with the context menu of the list.
<? XML version = "1.0" encoding = "UTF-8" ?> < Elements Xmlns = "Http://schemas.microsoft.com/sharepoint" > < Listinstance Title = "Color" Onquicklaunch = "True" Templatetype = "10050" URL = "Lists/colors" Description = "A list for colors" > </ Listinstance > </ Elements >
Option C. listtemplate indicates the list definition (list template) of the options that can be used to create a list on the "Create" page ).
Option D. moduel specifies the file used to set the SharePoint website in the element command list. Zero or multiple file elements can be used as sub-levels of the module element. Therefore, this item has nothing to do with the context menu of the list.
Therefore, the correct option for this question should be.
Refer:
Http://keremozen.com/2012/01/07/custom-context-menu-item-in-sharepoint-2010/
Http://www.thorntontechnical.com/tech/sharepoint/sharepoint-2010-context-menu-item-with-custom-code#.UZGptbLdihk
Http://blogs.msdn.com/ B /allenwang/archive/2010/09/08/how-to-create-custom-content-type-and-list-instance-in-sharepoint-2010-using-visual-studio-2010.aspx
Http://msdn.microsoft.com/zh-cn/library/ms462947.aspx
Question21
You create a custom site definition.
You need to modify the contents of the quick launch area.
Which file shocould you modify?
A. ONet. xml
B. schema. xml
C. vwstyles. xml
D. webtemp. xml
Resolution:
In this question, you need to change the quick launch area in site definition, which is actually an element of your site definition.
First, what is site definition? Microsoft defines it as: contains a server-side collection of files that defines the structure of one or more site templates. that is, the server contains several files (these files are the ASPX page files and XML files) used to define the structure of one or more site templates.
What are the important files in the definition of site definition? There are three important ones:
1. default. aspx: used to define the default homepage of a website
2. ONET. XML: This is the most important, according to ONet. the location of the XML file and whether it is a website definition or a part of the web template (that is, not only this file exists in site definition, but also this file exists in the web template ), tags in this file have the following functions:
• Specify the built-in network range and website set range functions of Websites created based on website definitions or web templates.
• Specify the built-in list types, pages, files, and Web parts for Websites created based on website definitions or web templates.
• Defines the top and side navigation areas displayed on the home page and the List View defined by the website (which is exactly what needs to be done in this question ).
• Specify the list definitions used in each website definition and whether these definitions can be used to create a list in the user interface (UI.
• Specify the document template that can be used to create a document library list in the UI and the files used in the document template.
• Defines the base list type from which the default SharePoint Foundation list is derived. (This function is available only for the global ONet. xml file. The new base list type cannot be defined .)
• Specify the SharePoint Foundation component.
• Define the footer section used in the server email.
Use custom ONet. xml website-defined tasks
You can execute the following types of tasks in the Custom ONet. xml file for custom website or custom web templates:
• Specify a backup Cascading Style Sheet (CSS) file, Javascript file, or aspx header file for the website definition.
• Modify the navigation area of the home page and list page.
• Add the new list definition as an option to the UI.
• Define a configuration for the website or web template, specifying the list, modules, files, and Web parts contained in the configuration during instantiation.
• Specifies the functions automatically provided by websites created based on website definitions or web templates.
You can execute the following types of tasks in the Custom ONet. xml file for custom websites, but not in the ONet. xml file for custom web templates:
• Add a document template for creating a document library.
• Define multiple configurations for the website and specify the list, modules, files, and Web parts contained in the configuration during instantiation.
• Customize the footer for emails sent from websites.
• Customize website-based custom components, such as the post-processor in the file dialog box.
3. webtemp_sitedefinitionname.xml: used when we create a new SharePoint site, there is a template selection area on the page, the configuration information of the template in this section. That is, this file defines the number of website templates under the current website definition. The name and description of each template include only one website template by default.
In fact, when you open Visual Studio 2010, create a site definition project and name it demo. sitedefinition. select "deploy as farm SOLUTION ". click Finish. in the project directory, you will find the site definition node and expand it to see the three important component member files.
From the above analysis, we know that option A is the answer.
Option B. schema. xml: this is a list definition file. The list architecture includes field definition, view definition, and toolbar definition, and specifies the content type, form, and default description for the created list. The list definition is included in the schema. xml file in % ProgramFiles % \ common files \ microsoft shared \ Web Server Extensions \ 14 \ template \ features or in the sandbox solution.
On the "Create" page of the list, each list definition that is displayed as an option has a schema. XML file, which is located in the subdirectory of % ProgramFiles % \ common files \ microsoft shared \ Web Server Extensions \ 14 \ template \ features or is deployed as part of the sandbox solution.
Option C. vwstyles. xml: the default view style file of the List (defining the default view of the list ).
Sharepoint2003: \ Program Files \ common files \ microsoft shared \ Web Server extenstions \ 60 \ template \ 1033 \ STS \ XML \ vwstyles. xml
Export point2007: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 12 \ template \ Global \ XML \ vwstyles. xml
Sharepoint2010 \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 14 \ template \ Global \ XML \ vwstyles. xml
Option D. webtemp. XML: in the deployment of Microsoft SharePoint Foundation, each server initially installed webtemp in the % ProgramFiles % \ common files \ microsoft shared \ Web Server Extensions \ 14 \ template \ lcid \ XML folder. in the XML file, lcid is a language/regional digital ID. For example, 1033 indicates English. There may also be one or more custom webtemp *. XML files. The webtemp *. xml file contains a detailed list of website definition configurations. When a new website is created, these configurations are provided on the user interface (UI) for the user to choose. The UI varies depending on whether a page is being created using a Microsoft Silverlight or HTML website. The original webtemp. xml file installed with SharePoint foundation cannot be modified. Because when we install updates or service packs for Sharepoint foundation or upgrade the installation to the next product version, changes to the files that were originally installed may be overwritten. For these reasons, the original webtemp. xml file cannot be modified.
Therefore, the correct option for this question should be.
Refer:
Http://msdn.microsoft.com/en-us/library/dd583160 (V = office.11). aspx
Http://msdn.microsoft.com/en-us/library/vstudio/ee231576.aspx
Http://msdn.microsoft.com/zh-cn/library/ms432370.aspx
Http://msdn.microsoft.com/en-us/library/ms460922.aspx
Http://msdn.microsoft.com/zh-cn/library/ms459356 (V = office.14). aspx
Http://msdn.microsoft.com/en-us/library/dd583132 (office.11). aspx
Http://msdn.microsoft.com/zh-cn/library/ms447717 (V = office.12). aspx
Http://msdn.microsoft.com/zh-cn/library/ms447717 (V = office.14). aspx
Http://msdn.microsoft.com/en-us/library/ms474369.aspx