Item Lister Web Part for SharePoint v4
As you know, SharePoint has standart item display, all items display forms for lists and
libraries. At the same time, views can be created in order to sort, filter and
page the result set of a list according to the requirements just like below:
I haven't seen any SharePoint portal owner that uses the standart design templates for their
business needs; everyone wants to create a fancy user interface design that matches the corporate
identity of the company.
When it comes to creating a customized portal design, we all know that master pages
come to our aid. We can define a totally different template for all the parts other
than the content part and use it in every page. If we're using SharePoint Server,
we also can define page layouts according to the portal design. What about views?
In SharePoint, items are stored in lists or specialized lists called document libraries.
For displaying multiple items in a page, SharePoint uses a tabular display called "Views"
that shows the items as rows and shows the items properties as columns. When it comes to
creating a web site or user friendly interface to attract portal or web site users, we
have to modify these views. Modifying views means opening SharePoint Designer and editing
some data view web part XSL.
Creating a custom interface for a view includes connecting to the portal with SharePoint
Designer and editing XSL. How many people can do it?
Since XSL is something between software development and user interface development, neither
software developers, nor user interface developers want to get involved with it. Finding a
true XSL developer is not so easy.
Is this rocket science? We just want to get the data and display it in a more user friendly
way, so is XSL the thing that we really need? Unfortunately, if we're dealing with SharePoint,
we really have to use XSL for this kind of stuff.
Actually, the real problem starts when a non developer wants to accomplish this task.
If anyone ( I mean a person who's not a SharePoint consultant, or a developer ) wants to
create a more user friendly display for "All Items" or "Last X Items" kind of web parts,
either one has to stick with the standart display features of SharePoint views, or has to
ask a SharePoint person about how to do it.
There is a web part called "Content Query Web Part". For these kind of requirements,
we tend to use this web part, but here are some consequences.
First of all, this web part is only included in the paid version of SharePoint; we can not
use it on SharePoint Foundation.
Secondly, there is no escape from XSL while using Content Query Web Part; sorry :(
Third of all, there is no built-in paging feature with Content Query Web Part. This means
that for custom branded "All Items" display, you really really display "All Items" :) If
you have 1000 items in a list, without paging, that page won't be loading in a reasonable
time frame :)
In many projects, we remake these branded "All Items" and "Last X Items" web parts
over and over again. Nearly the same XSL structure, but with different list ID's,
column references etc, we create the same output with lots of man hour.
Our clients need us when they need minor changes on the HTML or data query. Since they
have to deal with SharePoint Designer and XSL, it is not a good idea having these users
entering the dark side :)
Item Lister Web Part is a helper for branding SharePoint portals. You do not have to be
a developer or a SharePoint consultant in order to use it. It is easy to configure and
easy to use. You'll be creating "Last X Items" and "All Items" web pages and web parts
Please watch the case study I created part by part. You'll be seeing
the Item Lister Web Part in action. It is an 8 parts series with deep explanations
on how the Item Lister Web Part works and how it's configured.
In Part 1, I'm showing you the sample "Latest News" and "All News" pages with static
HTML. This HTML is my start point while creating the data model needed to store the
In Part 2, I'm creating the appropriate list to store the news data. I just create a custom
list and add some fields.
In Part 3, I'm creating the views that I need in order the Item Lister Web Part to work.
I'm giving you the basic configuration options of a list that Item Lister Web Part uses.
In Part 4, I'm just entering sample news data with the sample HTML given to me in the
In Part 5, you're going to see the Item Lister Web Part in action. I'm adding the web part
and configuring it with the appropriate settings. I'm talking about most of the configuration
settings of the web part in Part 5.
In Part 6, I'm adding a new item to the news list in order to show that my web part
works :) and how the web part responds to the item count and view configuration.
In Part 7, I'm talking about the Post and Pre HTML settings for the paging link buttons.
In Part 8, I'm using the Item Lister Web Part to create "Last 2 News" web part. At the same
time, I'm showing that exporting web part settings and importing it also works :)
You MUST watch the case study videos to fully understand what Item Lister Web Part does.
Do not be a lazy one, and please watch all of the presentations in order. I know that
the presentation is not enough for all the things I want to say about my web part, so I'm
going to summarize it's features and add the shortcommings of it.
For Item Lister Web Part to work, it needs a data source and a query in order to retrieve
data. You're providing these information by creating a standart SharePoint view.
A SharePoint view is bound to a list. So, when you provide the URL of the view that is
going to be used, you're providing the data source as well.
The data source can be a list or a document library. As I stated at the top of the page,
Item Lister Web Part works on both SharePoint Foundation 2010 and SharePoint Server 2010.
So, when it comes to page layouts on SharePoint Server 2010, we all know that the pages
that are created with a page layout are stored in "Pages" document library, which Item
Lister Web Part can retrieve data from. So, Item Lister Web Part supports Publishing Pages!
But when it comes to Discussion Board or Survey types of lists, the result set will be
absurd, and I don't think you may want to use Item Lister Web Part against these data
sources; it is not supported :)
Item Lister Web Part uses "Columns", "Sort", "Filter", "Folders", "Item Limit" configuration
sections in order to render the data. "Inline Editing", "Tabular View, "Group By", "Totals",
"Style" and "Mobile" sections are not used in any way while querying and processing the data.
You're going to reference fields in the HTML as a notation like @@[Field Display Name].
In order to the Item Lister Web Part get the data for the referenced field, the field
must be added as "Display" on the view's "Columns" section. Since you're defining the HTML,
there is no need to order the fields in the view.
"Sort" and "Filter" sections are used to create the query against the data source.
"Folders" section provides a query parameter to be used, it does not have anything to do
with the display. But I have to say that, Item Lister Web Part does not support foldered
structures. When a query is submitted against a data source, items and folders are treated
as the same, so clicking the folder and displaying the items below that folder is not
supported. Since, Item Lister Web Part is a content management helper, folders is not
one of Item Lister Web Part's interest. Even SharePoint Server 2010's Publishing Page
infrastructure neglects foldered structures.
"Item Limit" section is an important configuration. Just like a standart SharePoint view,
Item Lister Web Part reads this configuration and decides if any paging needed and / or
any paging buttons needed on the page.
When it comes to the shortcomings of Item Lister Web Part, it does not support "Group By"
and "Totals" configurations. You can still configure these sections, but the display will
not be affected with these configurations.
The other configuration sections, which I did not explain in details, are not relevant
for the usage of Item Lister Web Part.
The best part is, you can reference any view in the site collection that Item Lister Web
Part is used on. So, there is no limitation like "You have to reference a view that is in
the same site with the page that has the Item Lister Web Part on". :) Nice, isn't it?
As you know, there is a new feature called joining that is introduced on SharePoint V4.
Since there is no built-in interface on creating joined views, I did not test the Item
Lister Web Part on views that has joins on them, which are created with SharePoint Designer.
But, lookup fields are tested, and they work :) You can even reference multiple fields from
the referenced list, that you define on the lookup field on the "Add a column to show
each of these additional fields" section.
In some occasions, you have to display some items to the end user, but the end user must
not have any access to those items in SharePoint access rules. So, you do not give any
rights to the user on the list or specific list item, but you write code
( for developers: RunWithElevatedPermissions case ) in order to fetch the data. Item Lister
Web Part supports this scenerio. You can define to get the data with elevated permissions
with just one click on a check box. Please, watch the presentation below:
Be Careful! If a user has "Add and Customize Pages" right, that user can add this web part
to a page that he or she manages. So, this user can add this web part, configure a list or
document library, that he or she can not access, as a datasource, and click the "Get Data
With Elevated Permissions" option. This scenario explains how to reach a data source on
SharePoint that a user does not have any rights. So, do not give "Add and Customize Pages"
right to every user.
If you think this as a security issue, and you think if there could be a way to disable this
function, here is the answer:
If you add
<add key="SPWPItemListerAllowElevatedPermissions" value="false" />
appSettings value to the web.config files of your web applications, the Item Lister Web Part
will ignore the "Get Data With Elevated Permissions" option value while rendering the web
part for the whole web application. It's all up to you to allow or disable it, but by
default, reaching the data with elevated permissions is ALLOWED!
For performance issues, you may want to cache the data received from the data source.
You can configure data caching in Item Lister Web Part just with a click, and you can
provide the caching time frame in seconds. Please, watch the presentation below:
The feature is easy to configure but there are some issues that have to be considered
before using this caching feature. If there is a item level permission setting on the
data source, you can face unwanted results. Since, Item Lister Web Part does not provide
user based caching, when the cache is clean, the data returned from the data source for
the first person is cached. So, if this person does not have any read rights on the list,
no one will be able to see any data with the web part until the cache is cleaned and another
user requests the data. Another issue can be the display of non-public items to unappropriate
So, let's cut to the chase; use caching responsibly. If even only one user gets a different
result set from the data source with the same view, DO NOT USE CACHING!
At the same time, cache is not reset when you change the configuration, you have to ask
the system administrator to recycle the portal's application pool in order to clear the
cache before it's removal time.
This feature is the one that overcomes the Content Query Web Part, which does not have
built-in paging feature in it.
Item Lister Web Part renders paging links according to the selected view's properties and
the result set. It displays "Next Page" and "Previous Page" links on pages for paging
You should ask why there is no "1-2-3-4..." like paging navigation, which navigates the
user directly to the required page. This is a very disturbing situation on SharePoint which
has not been resolved yet.
In SharePoint, there is not a built-in paging functionalty in a way that I'm used to. If
there are 1000 items in a list, and if I want to see 10 items per page, SharePoint creates
100 pages for me, but if I want to navigate to the 50th page, I have to click the "Next Page"
link 49 times and see all the pages before the 50th one. This is a SharePoint default behaviour.
There are some programatic approaches to overcome this issue. I will not bother you with
technical details but, creating a "1-2-3-4 ..." like paging navigation creates performance
issues that hurts so much!, and does not provide consistent paging experience. So, I do not
use this method for paging at my customer's projects, and I did not implement this approach
in Item Lister Web Part too.
I do not support "1-2-3-4..." like paging navigation, but I support Ajax between pages :)
Just with one click, you can configure the Item Lister Web Part to implement partial post back
with Ajax Update Panel in order to prevent full page post back and provide a more user
friendly user interface for the user when the user navigates between pages. See the demonstration below:
One little note about Ajax support; if you change the "Disable full page post back between
pages" option in the web part configuration section and start to experience navigation
problems between pages, just re-get the page by clicking home link or clicking on the
address bar of the browser and hitting the enter button, when you save the changes and
return to the page. This is a little technical issue that's between you and me :)
You're going to get the HTML from the user interface developer and you're going to
implement this HTML with the Item Lister Web Part. I explained how to do it in the
presentations, so I won't be talking about it all over again. The important part about
HTML branding with Item Lister Web Part is referencing the fields. So let's talk about it.
You can reference fields in your HTML that you provide to the "Item Style" and "Alternating
Item Style" properties of the web part. The usage for referencing the fields in the view is
like this: @@[Field Display Name]. For example: @@[Title], @@[Created], @@[Start Date]...
It is important to know that the display name of the fields are case sensitive, so be careful
if you're not copy-pasting the field display name to the web part properties.
Item Lister Web Part supports all the fields that can be configured on SharePoint Foundation
2010. When it comes to SharePoint Server 2010, "Summary Links" and "Rich Media" fields are
not supported, since they have complex field rendering procedures. When it comes to "External
Content Type" field type, it is rarely tested and I saw it working, but I can not guarantee
that it works prefectly :(
Item Lister Web Part reads the configuration of the field and renders the field values
according to the configuration that is provided for the view. For example, for "Currency"
field type, the value is rendered with the selected currency initials. Another example can
be the "Hyperlink or Picture" field. If you select "Hyperlink" rendering option in the
field configuration section, it is rendered as a link, but if you select "Picture" rendering
option, it is rendered as a picture, as you can see in the case study presentation.
The only rendering option that is not supported is on the "People or Group" field type.
Item Lister Web Part renders the "People or Group" field value as a link to the user's profile
information page, just like standart SharePoint views, but it does not render user picture
or other information which can be provided in the field configuration.
Other than views, we usually need the URL of the item or the document in order to redirect
users to it. There is a special way to get the URL of the item or the document. Just like
referencing a field from the view, you can use @@[IL:DISPLAYURL] and @@[IL:FILEURL] variables.
You can watch the presentation below to see a demonstration:
@@[IL:DISPLAYURL] references the URL for the standart display form for the specific item.
It returns the pure URL for the form. This parameter works for every item in the portal.
@@[IL:FILEURL] refences the URL for a document. For documents, you can still use @@[IL:DISPLAYURL]
to get the URL for the display form of the document, but usually, you're going to reference
the direct URL of a file. For example, if you're dealing with pages in the portal, when the
user clicks on a URL for a page, they should'nt be taken to the display form of the page;
they have to be taken to the URL of the page itself.
As I told you, if you have a "Hyperlink or Picture" field, Item Lister Web Part renders it
according to the configuration of the field. But, if you need the pure URL as a string,
without any "img" or "a" tags, you can use @@[Field Display Name:URLONLY] notation. Let's
say you have a "Hyperlink or Picture" field that has a display name as "Outgoing URL" and
this field renders as a hyperlink. Let's assume that a list item has a dummy field value as
"http://www.spwp.net" for this field. If you use @@[Outgoing URL] notation, you'll get: <a href="http://www.spwp.net">http://spwp.net</a>.
But if you use @@[Outgoing URL:URLONLY], you'll get: http://www.spwp.net
As you know, SharePoint V4 introduced us the "Sandboxed Solution" infrastructure that
enables a more secure and managable solution management system.
Sandboxed solutions sound wonderful but there are many problems we face as a developer.
Generally, we can not use every class or method that we need as a developer in sandboxed
mode. So, we have to minimize the functionality in our web parts.
As an example, running code with administrator rights is not allowed in sandboxed mode. I
personally know that many of my customers do not give read access to anonymous users for
any list on SharePoint, but they want to display "Last X News" web parts at home page. The
only way to do this is using the "RunWithElevatedPrivileges" method, which we can not use
in sandboxed solutions.
So, what I want to say is that, my web parts are not developed in sandboxed mode, so they
can not be used on SharePoint Online :( Sorry Cloud Folks :( Maybe sometime in the future,
our paths will cross :)
With this update, if you're using URL Rewrite For Lists,
now you can have the option to reference the item's rewritten URL with @@[IL:URFLLink]
tag. This tag will give you the full rewritten URL of the item. Do not use this option
if you're not using URL Rewrite For Lists and / or
configured URL Rewrite For Lists on the
list you're working on. For more information on Url Rewrite For Lists, click here: URL Rewrite For Lists
On this page, you've found what Item Lister Web Part is and how to use it. Now I'm going
to tell you how to purchase it.
Please read all the pages linked on the "About My Software" section at the bottom of
this page since they'll give you detailed information on how I run this business at SPWP.NET.
If you purchase my web part, I'll assume that you read, understood and accepted the terms
pages. To purchase Item Lister Web Part, just click on the "Add To Chart" links.
Do you know why you need multiple licenses? In a typical scenario, you're going to have
at least 1 production SharePoint Server, 1 pre-production server, 1 staging server,
1 test server, at least 1 development server; which means 5 servers at least!
If you have a huge farm of development, test, staging and production servers,
or if you're running a SharePoint consultancy business and you want to purchase Item Lister Web Part,
I have a great offer for you:
What this discount really means is that, you pay for 2 Item Lister Web Part licenses and
you get 3 licenses!
There is also a discount if you purchase Item Lister Web Part with Item Viewer Web Part
After the payment procedure, you'll be redirected to the licence creation page. On that page
you'll be downloading the SharePoint solution file and you're going to enter the FQDN
( Fully Qualified Domain Name ) of the server you want to license the Item Lister Web Part
for. When you enter the server name and click "Create License" button, a license value is
created IMMEDIATELY. The web part is licensed offline, so your SharePoint Server does not have to be
connected to the internet in order my web part to be licensed. All you need to do is to
enter the license key and the ClickBank receipt number to the web config's appSettings
If you need anything to ask, just visit my support page. It can be about purchasing,
technical issues, feature inquiries etc, I, DIRECTLY MYSELF, will be helping you gladly.
Thank you for your interest in Item Lister Web Part...