sitecore

Set queryable source on Rendering Parameter Template field

一个人想着一个人 提交于 2019-12-07 02:40:08
问题 I have a Rendering Parameter template applied to a sublayout. It has a single Droptree field on it, and I want to set the Source of that field to a Sitecore query so I can limit the options available for that field. Source can be: query:./* or query:./ancestor-or-self::*[@@templatename='MyTemplate']/ The query just needs to grab items relative to the content item that we're on. This normally works with Droptree fields in the content editor. However I'm finding that the query isn't working

Excluding items selectively from Sitecore's Lucene search index - works when rebuilding with IndexViewer, but not when using Sitecore's built-in tools

久未见 提交于 2019-12-07 01:33:53
问题 On a site powered by Sitecore 6.2, I need to give the user the ability to selectively exclude items from search results. To accomplish this, I have added a checkbox field entitled "Include in Search Results", and I created a custom database crawler to check that field's value: ~\App_Config\Include\Search Indexes\Website.config: <search> <configuration type="Sitecore.Search.SearchConfiguration, Sitecore.Kernel" singleInstance="true"> <indexes hint="list:AddIndex"> <index id="website"

Sitecore Publishable flag makes it impossible to GetItem() from Master database

情到浓时终转凉″ 提交于 2019-12-07 01:01:14
问题 I'm using sitecore 6.6.0 (rev. 120918). From the sitecore admin portal, I go and turn off the Publishable flag of an item (see image). After this, Sitecore.Data.Database.GetDatabase("master").GetItem("{itemID}") returns null . If I turn ON the Publishable flag again, GetItem() returns the correct item. What's the reason for this behaviour? Publishable setting controls the ability to publish to the Web database. Why does it effect the GetItem() API call to the master database? 回答1: I've found

Sitecore 8:Patching an agent

℡╲_俬逩灬. 提交于 2019-12-07 00:56:28
I need to patch agent in other environment so I have created a patch as below: <agent type="Sitecore.Tasks.PublishAgent"> <patch:attribute name="interval" value="01:00:00" /> <param desc="mode (full or smart or incremental)">smart</param> <param desc="languages">en</param> </agent> Here I patch attribute using <patch:attribute name="interval" value="01:00:00" /> But how can I patch a param?.Also how can I test the same? Thanks You can patch exactly as you have posted, i.e. if the param matches an existing param of the same name then it will overwrite it. There is no need for any additional

Sitecore Search Predicate Builder multiple keyword search with boosting not working as desired

徘徊边缘 提交于 2019-12-07 00:34:39
问题 I have sitecore pages / lucene documents with the following fields: Title Filename Content File Contents I'm creating a search for these and have the following requirements: Hits containing the whole phrase in the title field should be returned first. Hits containing the whole phrase in the filename field should be returned second. Hits containing the whole phrase in the content should be returned third Hits containing the whole phrase in the file contents should be returned fourth Hits

How do I render a Media Library item by itself?

时光毁灭记忆、已成空白 提交于 2019-12-07 00:15:03
问题 How do I render a Media Library item image in a sublayout with Sitecore controls? With a normal content Item that has an "Image" field it's a piece of cake... just use the sc:Image or FieldRenderer control. But I have something like this: <asp:Repeater ID="rptImages" runat="server"> <ItemTemplate> <sc:FieldRenderer ????> </ItemTemplate> </asp:Repater> And the code behind: rptImages.DataSource = Sitecore.Context.Database.SelectItems("/sitecore/Media Library/Images/Some Image Folder/*")

Sitecore - Image field in parameter template

南楼画角 提交于 2019-12-06 23:01:37
问题 If I have an image field in a parameter template, what are the steps involved in getting the URL of the image in c#? 回答1: @mdresser makes a valid point about what should and should not be a rendering parameter. However, I don't think that Sitecore intentionally made it difficult to use image fields in parameter templates. They simply built the parameter template functionality over the existing key-value pair rendering parameter functionality. If the name of your image field on the rendering

Filtering out page content with AJAX in Sitecore

爷,独闯天下 提交于 2019-12-06 20:55:34
I have a page in Sitecore that displays the list of clients. There's a form with two select boxes that should filter out clients not matching specified criterias. Clients list should be refreshed via AJAX everytime user changes one of the values in the form or after clicking Submit button if JS is disabled. What is the suggested approach I should take to have this working in Sitecore? I'm not sure about Sitecore part, I know how to call AJAX methods/ I found a solution that feels a bit better then what other have proposed here. I've created a new Device in Sitecore, created a new layout in it

Sitecore HTML cache and external data sources

半城伤御伤魂 提交于 2019-12-06 18:49: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 this issue? I've got only one idea so far - trigger cache cleanup when the index update is over, but it

Sitecore Project - Localhost just hangs

て烟熏妆下的殇ゞ 提交于 2019-12-06 16:32:40
I've been using this same Sitecore project, for more than 2 years now. Upgraded to Sitecore 7.0 this spring, and everything just ran like it should. But yesterday, suddenly out of nowhere, i can't seem to run my project anymore. I'm using Visual Studio 2013 with IIS Express (64 bit). And when i try to build and run my site through localhost, it just hangs. I even tried to let it load for 1 hour+, but it still just loads with nothing happening. I tried to debug it further with Fiddler, but nothing happens. I even tried to delete a bunch of important files, like web.config. But it still just