Sitecore Cloning – Part 1

Here we will see something about Sitecore cloning functionality. Sitecore clones are an efficient way to place your items throughout the content tree and then have the content controlled from one central location in the content tree.

It is basically used when you don’t have to sift through a huge content tree just to change a tiny thing to a parent content piece and all its duplicates.

A clone is an item based on the data template associated with the cloned item. Rather than inheriting values directly from standard values, clones inherit field values from the cloned item. In clones, Sitecore uses the __Source field in the Advanced section of the standard template to specify the cloned item.

  • It is different from Sitecore copy/duplicate in the following terms:
    • Cloning feature won’t appear after you right click the item on the content tree. It is available in the configure tab.
    • When something is duplicated in Sitecore, it’s made a double of the item, but the duplicated item has no relationship with the parent item.
    • When something is cloned in Sitecore, it’s still making a double of the item, but this time the cloned item receives input from the parent item. If you change pieces of the parent item those changes will reflect in cloned item.
    • If you change a piece of cloned item and then make changes to the parent item, the changes to the parent item will not override the changes to the cloned item, instead a change notification will be displayed on the cloned items when the field value in the original item has been changed.

  1. Review the original item
    • Go back to review the change of original item’s field value
  2. Accept the change
    • Apply the same field value change from original items to the cloned item field, and                the [original value] will be displayed next to the field item
  3. Reject the change
    • keep the existing value on the cloned item and hides the message

Continue reading Sitecore Cloning – Part 1

Advertisements

Performance Optimization in ASP.NET Web Sites

Asp.net Optimization And Performance.

Raj Aththanayake

Performance is an important aspect of a modern day web application development. Not only it makes sites seamless to use but also increase the scalability and future proof. In this article, we will look at various aspects of improving the performance of web applications. We would only concentrate on the browser/web server side performance as oppose to server/app server/database server performance optimizations.

Before we getting into detail, the first question is, do we really need optimized the web sites?

Amazon.com has performed a test on their web site, and when they slower the site in 100ms, the sales dropped by 1%. As you would imagine a company like Amazon, 1% is a huge lost

Google slower their Search Engine in 500ms, the traffic dropped by 20%

As you can see, it is a very important aspect of modern web site development.

This even becomes more important as nowadays most sites…

View original post 1,571 more words

Auto Refresh Web Page In WebApplication

In this post we will have a look for how to refresh web page? There are following ways to reload your web page after some interval of time (Eg:- in 10 seconds).
You can simply add following line of code in between <head> … </head> section to enable auto refresh in an Asp.Net web page or a HTML page.

 <meta http-equiv="refresh" content="15"/>  

You can also add follwoing line of code in between <head> … </head> section to redirect to a specific page if you put the URL inside the tag.

 <meta http-equiv="refresh" content="5;url=http://www.google.com" />  

If you want to set the refresh web page dynamically then that can be done in Asp.Net by adding server side code in the Page_Load function to set it, as shown below:

 Response.AppendHeader("Refresh", "15");  

Add Span Tag To Hyperlink

To add span tag to hyperlink we need use prepend property in jQuery. Code is as below :

 <html>  
 <head>  
 <title>Add span tag inside of href</title>  
 <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>  
 <script type="text/javascript">  
 $(function () {  
 $('#htitle').text('');  
 $('#htitle').prepend(" <span class=testinghref >Example for adding span </span> tag to href through jquery");  
 })  
 </script>  
 <style type="text/css">  
 .testinghref {  
 background: grey;  
 font-family:arial;  
 font-weight:bold;  
 }  
 </style>  
 </head>  
 <body>  
 <a href="#" id="htitle"></a>  
 </body>  
 </html>