This was all about Scenario's which I involved in my profession.
Thursday, 25 January 2018
Sunday, 20 August 2017
Implement Sitecore Solr Simple Search in 5 mins
Follow the below steps to search by item name
- you just need to add references of the Solr content Seach from visual studio
- Add the below code in your class file as a method
List<SearchResultItem> results;
using (var context = ContentSearchManager.GetIndex(indexName).CreateSearchContext()) { var predicate = PredicateBuilder.True<SearchResultItem>(); // must have this (.and) if you want o query specific path then enable below line //predicate = predicate.And(p => p.Paths.Contains(FolderItem.ID)); // must have this (.and) predicate = predicate.And(p => p.Name == searchTerm); results = context.GetQueryable<SearchResultItem>().Where(predicate).ToList(); } - Finally, Rebuild indexes from Sitecore control panel
Wednesday, 17 May 2017
Adding version and copy content for Sitecore items
Please download the zip file from below link and install in your sitecore instance.
Adding version and copy content for Sitecore items
Friday, 28 April 2017
Online Pdf language translator
Below link is useful for translation of pdf file across all
languages. If we need English then add en in the url, for german add de like that.
Thursday, 4 August 2016
How to get rendering view or action name in razor view
To get controller name:
ViewContext.RouteData.GetRequiredString("controller")
To get action name:
ViewContext.RouteData.GetRequiredString("action")
Wednesday, 6 April 2016
Access Drop link Field target item | Access Drop link Field target item value
((LookupField)DataSourceItem.Fields["Address"]).TargetItem
Friday, 1 January 2016
How to return Javascript from an ASP.NET MVC controller action
We can use ContentResult to return the content from the MVC controller action method
Public ActionResult Helloworld()
{
return Content("<script language='javascript' type='text/javascript'>alert('Hello world!');
}
Subscribe to:
Posts (Atom)
Extracting Nupkg files using command line
Rename it to zip first then extract files as below 1. Rename-Item -Path A_Package.nupkg -NewName A_Package.zip 2. Make sure to repla...
-
In this exercise we will create a new feature module in our solution. Modules are a conceptual grouping of all assets related to a sin...
-
Adding something to the first item in a loop. As an example, below adding the active class to a bootstrap element, useful for tabs, menus...
-
Getting-started Bootstrap Components Grid Positioning