Sunday, 17 September 2017

Create custom ContentEditor Field in Sitecore?

First of all, I would like to explain about Content Editor fields in Sitecore.

So let's start, while creating a template in Sitecore we require giving field type like:
SingleLine Text
Rich Text
DateTime
Droplist
Multiline Text
etc.

Now sometimes content editor ask developers for custom Content Editor Fields in Sitecore.
So with this blog, I will create custom content Editor Field by making a replica of existing field types.

 So First go to the place where all the existing content editor fields are placed in Sitecore that mean Core Database.
sitecore-field-type-tree



Now Create your own custom field Directory at /sitecore/system/Field types where will put our customfield datatype item.





After creating custom field directory now it's time to create customField Datatype item at /sitecore/system/Field types/CustomField



sitecore-custom-field-tree




and given the assembly and class name of custom FieldDatatype as above.

Here is the code snapshot where we inherited the existing Sitecore field type item

sitecore-custom-field-class



Now come back to Master Database and on template uses this custom field datatype.


sitecore custom field type


And yes we successfully created a replica of the existing field type.

sitecore-custom-field




Now it's on you which type of custom field we wanted to implement.




Tuesday, 12 September 2017

How to Create RSS Feed in Sitecore?

Before going to start creation process,

We will go with traditional way (Safe and Solid) means first What, Why and How ?




1. What is RSS Feed?

is Rich Site Summary responsible for the delivery of continuously changing web content. For Example: Suppose you have so many sites, portals and social media platform where you want to update your latest content automatically listed then RSS come into the existence.

So it's really amazing technique for Content Publisher.

2. Why to use RSS Feed?

Why, good question.
Suppose you have content related to:

Latest Events
Latest News
Latest Blogs
Latest Offer Posts
etc..

which you want to publish automatically on the other sites, platform then use RSS Feed.

3. How to create RSS Feed for our Sitecore Instance?

Now come to last but not least, So let's start creating RSS feed in Sitecore.

Oh I forgot one important thing, Let me explain here - "to publish latest content automatically using RSS on other sites you need RSS external URL"

for example: YahooNews (http://news.yahoo.com/rss/)

Now In sitecore at which path you wanted to put your RSS item means
here I will put my RSS item at home level So that every item will be listed.




now here at this path will create RSS item of template type "/sitecore/templates/System/Feeds/RSS Feed"




after creating RSS item give the input for fields

like the link of the item to list all the descendants, Link of the instance




now design RSS for the item which we want to list to the RSS genreated link's content.


sitecore-rss-page-item

sitecore-rss-feed-design


after this, publish RSS item and also item for whom we design RSS(here will publish home item bcz we set RSS design for this item).
and hit /run on the live mode and yes we achieve this.



sitecore-rss-item


Have a Great Day, Let me know if any issue will my pleasure!!!