sitecore

Nested Wildcards to Handle Virtual Items in Sitecore

北战南征 提交于 2020-01-04 09:06:18
问题 TLDR; What is the best or recommended way to work with complex virtual items at multiple levels? I'm working on something currently that instead of using query string variables to filter properties, I would just like to extend the URL and allow those URLs to filter. Events: ~/events/2012/april or ~/events/lunches or ~/events/6CB27D08-358E-49AA-8107-16A50E963C70 I currently have a wildcard setup to handle the last case or the year but ran into the snag of a wildcard only handling one level so

how to create a custom token in sitecore

白昼怎懂夜的黑 提交于 2020-01-04 05:05:13
问题 I am trying to create a custom token where, if a user inputs certain text in a rich text editor field, that text will display a value. So say the user inputs @@tester like, "Todays month is @@tester" in a rich text editor field. I have c# trying to find @@tester in any rich text editor field within sitecore, and if it finds that token to find that token in a title field that matches where the text is to be replaced. So ie: Item Name = token Item ID = {06912058-6U9A-4BBF-BAE3-9306974EBE68}

Intermittent SQL connectivity issue with AWS RDS

人走茶凉 提交于 2020-01-04 04:07:05
问题 We are currently experiencing an intermittent issue with our ASP.NET website (built on Sitecore) where the website cannot connect to SQL server for seemingly random periods of 15 minutes. After 15 minutes, the issue resolves itself and the website comes back up. The error message is: Exception: System.Data.SqlClient.SqlException Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify

YouTube embed code on iPad

落爺英雄遲暮 提交于 2020-01-04 03:55:09
问题 I'm working on improving the experience of a site by adding in iPad support. This includes support for videos. Our client is pushing towards a YouTube model for storing and serving videos -- great for us! I originally planned to implement the use of YouTube's new HTML5-supporting <iframe> snippets. This offloads the device detection to YouTube and makes embedding a video a cinch as we don't need to worry about compatibility. It turns out the the CMS we're using, Sitecore CMS, strips out

jwPlayer causes rendering not to load in Sitecore's Page Editor

故事扮演 提交于 2020-01-04 03:52:08
问题 I'm currently working on a rendering in Sitecore 7.2 (MVC) that will show a jwPlayer given a link to a video (either in the Media Library or from an external source, like YouTube). When I add the rendering (with a valid data source) through Presentation Details in the Content Editor everything looks fine, and works perfectly. The trouble that I'm running into right now, though, is that when I try to do the same thing from the Page Editor (with the exact same rendering and data source),

Sitecore Refresh Index

瘦欲@ 提交于 2020-01-04 02:39:08
问题 I am working on Sitecore 7.2 and using Lucene search, I have created few templates and pages and search is working fine, now I want to exclude few templates from the index, I have a custom crawler and that does remove the templates from indexes but index is not refreshed, I am using following code to update index foreach (Cache cache in CacheManager.GetAllCaches()) { //WriteLog(string.Concat(" Clearing Cache, name = ", cache.Name)); cache.Clear(); } //WriteLog("Clearing caching finished");

Adding a workflow to an existing item in sitecore 6.5

*爱你&永不变心* 提交于 2020-01-03 15:33:20
问题 I'm trying to set up workflows in sitecore 6.5. I can get the workflows to run just fine on NEW data items created from templates, but everytime I go to a data item that existed before I created the workflow, the ribbon bar tells me "This item is currently not part of a workflow". I've added the Workflow I want set on the Default Workflow field, and in the Workflow field in the data item, but still the workflow is not applied. I'm not sure how to get a newly created workflow to be applied to

Sitecore Custom Data Provider doubles language versions?

梦想与她 提交于 2020-01-03 04:15:07
问题 So lately I've been working on a Custom Data Provider for Sitecore and it's really neat and works pretty well until I encountered this: As you can see I'm receiving double language versions. Even though the GetItemVersions of my DataProvider looks like this: /// <summary> /// Used to retrieve version and language information of given item. /// </summary> public override VersionUriList GetItemVersions(ItemDefinition itemDefinition, CallContext context) { VersionUriList result = null; if

Sitecore HTML cache and external data sources

天涯浪子 提交于 2020-01-03 02:31:26
问题 How would you handle a situation when you want to cache some sublayout that relies on external data(search index, etc.)? Here's the example: After updating content you click "Publish" in Sitecore. HTML cache is automatically cleared after publishing. Sublayout is rendered and put into the cache on first request, but the search index is not yet updated. Search index is updated. Until the next cache cleanup, sublayout will display the cached (obsolete) date. Are there any simple ways to fix

How can I get Sitecore Field Renderer to use a css class for an image

試著忘記壹切 提交于 2020-01-02 17:54:28
问题 Using Sitecore (7) & MVC, I'd like to know how to add a css class attribute for an image to the field renderer in sitecore. Without Sitecore it looks like this: <div class="background-container"> <img src="/images/background-1.jpg" class="background"> </div> With Sitecore: <div class="background-container"> @Html.Sitecore().Field(Constants.Fields.HomeBackgroundImage) </div> There doesn't seem to be a way to add the class background to the image itself in Sitecore. Is there another way to do