Surendra Sharma

Surendra Sharma

Search This Blog

Thursday, November 26, 2015

Why multilist field is not showing all the items in Sitecore



I have just started working on new Sitecore project. From couple of weeks I was busy on requirement gathering and doing a manager kind of works (Boring). Programming, coding and technical stuffs are my first love.

Within this new project, one of my teammate created one folder in Sitecore and populated 400 items within it. He pointed that folder to multilist control.

He started complaining that he is not getting all the 400 items of folder in Multilist. I thought he was doing something wrong.

Later on I didn't found any reason why multilist is showing only first 100 records and why not showing all 400 items?

Solution:-
I come to know that there is one setting in web.config file where it’ss mentioned that multilist and valuelookup control will only show first 100 items. If you want to show all the items then keep its value to 0.

<!--  Query.MaxItems
      Specifies the max number of items in a query result set.
      If the number is 0, all items are returned. This may affect system performance, if a large query result is returned.
      This also controls the number of items in Lookup, Multilist and Valuelookup fields.
      Default value: 100
-->
<setting name="Query.MaxItems" value="100" />

But Sitecore also warns that if you set its value to 0 than it may affect Sitecore performance for large results set.

I am big fan of Sitecore configuration technique.

Please leave your comments or share this trick if it’s useful for you.

Friday, October 23, 2015

How to change folder structure of bucket in Sitecore



Sitecore 7 and above has feature called as item bucket.

Item bucket can store a theoretically unlimited amount of items without displaying them in content tree i.e. children’s are displayed as hidden items.

But if you want to show all hidden items then click on "View -> Buckets".

All child Items are by default displayed in tree structure of date and time format.

But what if you want to show items only according to Year wise or combination of date and time wise. How to do that?

Solution:-

Sitecore provide its config file with its every new feature. So Sitecore provides "Sitecore.Buckets.config" for bucketing. Open this file and locate below entry 

<setting name="BucketConfiguration.BucketFolderPath" value="yyyy\/MM\/dd\/HH\/mm"/>

If you want bucket by year wise then modified this configuration entry as 

<setting name="BucketConfiguration.BucketFolderPath" value="yyyy"/>

That’s it. 

But take precaution of the fact that this will create only year folder in all the buckets in content tree.

Please leave your comments or share this tip if it’s useful for you.

Wednesday, October 21, 2015

How to fix Intelligence problem in VS 2012 with MVC 4 project

I have just started working on my first MVC project and I come to know that my intelligence is not working in MVC 4 project. I didn’t found any answer for MVC 4 project on internet.

If you are facing intelligence problem in MVC 4 project, try your luck by placing yellow highlighted lines in <appSettings> section in web.config file.

  <appSettings>
    <add key="EmailReminder.FromAddress" value="name@server.net" />
 
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="false" />
     
  </appSettings>
 
At least it worked for me. :)

Please leave your comments or share this tip if it’s useful for you.