Tuesday, 9 September 2014

Sitecore Module: WeBlog Not Displaying Latest Blog Entries?

Hey Sitecore Techies!
Most of you may be currently enjoying one of the best Sitecore events that every Sitecore developer would like to attend - that is Sitecore Symposium event.

 Hope you are having good learning time. Let's add one more learning today.

If you are using Sitecore Module - WeBlog and if you face a situation where your blog page is NOT showing latest blog posts on live environment, then this post may help you.

The solution is simple, you need to rebuild the search index of "WeBlog" and "Web" as shown in below screen capture.

After rebuilding above search indexes, your blog page should now show all expected blog posts.
If you would like to know where WeBlog index is configured?, then you should refer WeBlog.config file under App_Config\Include folder.

Have a happy Sitecore Journey!

Monday, 1 September 2014

How to use one section of site from another site having same layout in sitecore?

Hey Experts - How's your Sitecore journey going on?

Today I would like to share power of device and fallback device in Sitecore with you. So let's go ahead and first see the scenario where this can be helpful.

Let's say you have multi sites in your Sitecore instance. One of your sites have a section which needs to be pointed to another site by keeping same layout.

Say for example - You have two sites, site-A and site-B. One of the section of site-B needs to be pointed to site-A. You can simply point to site-A section from site-B easily by giving respective item path of site-A. But challenge over here is - if you point to site-A from site-B then that section will show layout of site-A and you want to have layout of site-B. So how can you achieve this?

Below are steps involved to achieve this requirement:
1) Create a new Sitecore device for siteB by pointing fallback device to devices/default

 2) Add "device" attribute for siteB in SiteDefinition.config or web.config whichever you are using.

3) Copy controls of section/item of site-A from default device to above newly created device using  presentation -> details option from Sitecore ribbon

Please remember that all the items/pages of siteB does not require to add controls in "siteB" device, you can add controls in "Default" device as well.

You may have question then how will it work as we have mentioned that siteB should use device siteB in SiteDefinition.config file (as mentioned in step-2)?
Yes - you are thinking correctly, but you need to also recall one more point - and that is "Fallback device" which is pointing to "Default" device (as mentioned in step-1).

So flow is like this:
Whenever any Sitecore page of siteB is requested --> It will first look for "siteB" device --> If "siteB" device is found then it will load controls inside that.

Whenever any Sitecore page of siteB is requested --> It will first look for "siteB" device --> If "siteB" device is NOT found --> It will load fallback device controls (which is default device)

Note: In this requirement, we don't have any security constraint of pointing item from one site to another.

Have A Happy Sitecore Journey!!!