Data View Web Part
- Need SharePoint Designer to configure it
- Displays data/Items with in sub site
- Displays data ( items) from only one List/Library
- Binds to List/Library GUID
- XSLT Style Templates store on Web Part itself
- Available on all template
Content Query Web Part
- Can be configurable from Browser
- Displays data/Items from Site Collection Level
- Displays data (items) based on Content Type
- Binds to Content Type
- XSLT Style templates stores on ItemsStyle.xsl
- Available on Publishing Portal template
Features of DVWP
- DVWP can fetch data from data sources other than lists like xml files.
- DVWP can fetch data from other site collection.
- DVWP can merge data from more than one list.
Features of CQWP
- CQWP can fetch data based on Content Type.
- You can enable RSS feed in CQWP.
- RSS feed in CQWP is XSLT based, which gives you option to customize the RSS feed. CQWP uses the /Style Library/Xsl Style Sheets/Rss.xsl file for rendering RSS feeds.
- Edit the web part and add the “RSS Feed List” as a source.
- In the Presentation Section under Feed enable feed for the web part. In the Fields to display map the Description list column with the Description slot.
- You can map list columns with the Page properties.
- CQWP generates Field to Display which you can map with your custom columns.
- Slots are reusable templates in which you can map your Column Values without going into the code. CQWP parses the selected Item Style template and generates slots for it: every @Property becomes a slot.
- We can map custom column values into these slots. E.g. If we a custom column ‘Category’ then we can map its value to ‘Title’ slot as below. Amazing thing is, we do not have to pull our hairs to get the internal name of the column. We just need to write the Display Name of the column to be mapped. So Title will take Category value now.
- Moreover, you can map more than one column into the slot but only the first non-blank column value will be shown.
No comments:
Post a Comment