The next couple of lines are simple formatting instructions for the XSLT processor. The rest of the file consists of nothing but parameter declarations which are automatically populated by the XsltListViewWebPart before the transformation is run.
That's a lot of parameters! The most important part of this entire file, besides the very handy parameters you get to use in your stylesheets is the import of the fldtypes. Then, main. You can see an example of the 'before and after' of this process here. One of the nice things about this 'everyone does it the same way' thing is that if you want to know how X-feature is rendered, you can search in fldtypes.
I mentioned before that we want the menu called the Edit Control Block Menu or just "ECB menu", to appear over the Title column instead of just the filename. So our best bet is to figure out how it's done for the filename. Let's just back up one second, and first think about something. Before we go transforming the output, we need to make sure we have all the input right. Just what is the filename field anyway? How does it tell SharePoint to read the necessary data into the dsQueryResponse?
If you dig into the documentation on MSDN, you will eventually find out that the filename text, the part that you and I like to call the filename at least, is a lookup attribute called FileLeafRef. But that's just a single value. It's not a menu! It's not even in a table cell!
How does this thing work? The stuff you see on the page are created using Field definitions. These of course can be created using CAML. What is the Field definition for the filename column that has the menu on it? Poking around in the documentation again, we see that the particular field definition for what is shown as "Name linked to document with menu " in the web interface is called LinkFilename.
It's a field of type "Computed. I'll explain. Computed fields are always 'computed' at render time. They store no value in the database themselves, but can use pieces of information from one or more other fields of the same item. This is not the same as a Calculated field, which actually does store its value in the database, and is only updated when the item is changed.
They include the contents of other fields by "referencing" them in their field definisions. When a CAML view query is executed it determines what fields it will need to load by checking the aggregated list of all of the referenced fields declared using FieldRef child elements in CAML.
This can get rather recursive. About the Author More from this Author. Leave a Reply Cancel reply. Categories Cloud Digital Transformation Microsoft. Follow Us. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Learn more. Asked 7 years, 7 months ago. Active 7 years, 7 months ago. Viewed 2k times. Improve this question. Check this : blogs. Add a comment. Active Oldest Votes. Download Microsoft Edge More info. Contents Exit focus mode. ListDisplayName Attribute Contains a list reference that uses the localized display name, such as Announcements.
Xsl Element Optional. Contains an inline style sheet. XslLink Element Optional.
0コメント