sitecore

droplink and treelist values in sitecore search

五迷三道 提交于 2019-12-11 09:00:06
问题 How to get droplink and treelist values in sitecore search . Below are my code and config file . But when i am searching based on droplink and treelist value its not coming in search result . var fquery = new FullTextQuery(search); SearchHits searchHits = sc.Search(fquery, int.MaxValue); return searchHits.FetchResults(0, int.MaxValue).Select(r => r.GetObject()).ToList(); config file entry . I am not sure if i have to parse them or something else . Looking forward for help. 回答1: You don't say

Globally exclude cloned items from index?

我怕爱的太早我们不能终老 提交于 2019-12-11 08:35:29
问题 I am looking for an elegant way to exclude cloned items from my web index. I am having items appear as duplicates in my search results. I'd prefer it if only the original items appear and no clones at all. Some possible solutions that come to mind are to: Create a Global Item Boosting Rule to drastically lower the boost value if the item's _Source field is not empty. This is not preferred as it only lowers the score and does not remove the clones from the search results. Exclude the cloned

Datasource in Repeater in Sitecore

烂漫一生 提交于 2019-12-11 08:26:11
问题 I have the following inside a repeater; <sc:Link runat="server" DataSource='<%# (Container.DataItem as Item).Paths.Path %>' TextField="Title" LinkField="Title" /> This however fails. I have also tried with <sc:Link runat="server" DataSource='<%# Container.DataItem %>' TextField="Title" LinkField="Title" /> Which also fails. What am i missing? 回答1: Try setting Item parameter instead of DataSource. I don't have many sc:Link controls in my code, but here is one I know works: <sc:Link ID="hlMore"

Changing IIS URL Rewrite config location

陌路散爱 提交于 2019-12-11 07:57:00
问题 When used at site level, the IIS7 URL Rewrite 2 module saves its configuration in the web.config file of that site. I'm using Sitecore CMS, and best practice is to store any web.config customisations in a separate config file for ease of upgrading, staging/production setups etc. Is there any way to specify a different config file for IIS7 redirects? I know that application-level rewrites are stored in ApplicationHost.config, but I have several sites running on the server and would like to

Change sitecore item without redirect

早过忘川 提交于 2019-12-11 07:56:31
问题 I have a custom pipeline processor inserted after ItemResolver in which I overwrite the current context item with a new item selected by the content editor from a droplink. If I go to that dynamic item via a normal request through my website and through my processor and i change my context item, it will stil render the same item: public override void Process(HttpRequestArgs args) { // some code Context.Item = dropLink.TargetItem; } Strangely, if I issue a request via the item API, sitecore

How to index sub-content in Sitecore with Lucene?

柔情痞子 提交于 2019-12-11 07:04:01
问题 I'm using Sitecore 7.2 with MVC and a component approach to page building. This means that pages are largely empty and the content comes from the various renderings placed on the page. However, I would like the search results to return the main pages, not the individual content pieces. Here is the basic code I have so far: public IEnumerable<Item> GetItemsByKeywords(string[] keywords) { var index = ContentSearchManager.GetIndex("sitecore_master_index"); var allowedTemplates = new List<ID>();

Sitecore switches user session with another user

*爱你&永不变心* 提交于 2019-12-11 06:56:47
问题 I have an FBA site that uses Sitecore. Every so often, it will confuse one user with another. What I mean is, somehow User A will unintentionally hijack User B's session. User A will be looking at a page that a) they don't have permission to view, and that's b) customized for User B. The one time I was able to reproduce (accidentally) , I got my original session back after I clicked through to another page. I know Sitecore leverages the Aspnet membership DB, so this might be an issue with

Sitecore empty field in multi culture

穿精又带淫゛_ 提交于 2019-12-11 06:46:13
问题 Here is a brief understanding of my scenario, Create a template with 2 unversioned fields Sport and Animal Create an item based on this template in 2 languages English & Arabic For English language version fill both fields with "I am English" For Arabian , leave Animal field empty, and Sport -> set Arabian value Result: When one requests a page with Context , language = Arabian , Animal field would show I am English , whereas Sport would have Arabian value . Hi Nikolay Mitikov, I have two

Sitecore set multi reference field value programmatically

痴心易碎 提交于 2019-12-11 06:45:28
问题 How to set a multi-reference field value programmatically if I have collection of items/ids? E.g. Build following raw value "{guid1}|{guid2}|{guid3}..." In my specific case I need to import a tree of items and on one level a parent was using children as repository and it also had a multi reference list to a subset of the children based on some criteria. I wanted to build a flexible list based on ordering or filtering and then set value of parent without making code specific to a list type -

customizing url mapping of multiple sites in sitecore

谁说我不能喝 提交于 2019-12-11 06:41:17
问题 So, I want to customize my mappings of urls to home pages inside Sitecore my sites home pages are nodes like this (below /sitecore/content): /FOO/us /FOO/ca /FOO/..other countries /BAR i Want to reach them by the following urls: mysite.com/us -> /FOO/us mysite.com/ca -> /FOO/ca mysite.com/bar -> /BAR my sites declarations are like this <site name="FOO-US" virtualFolder="/us" physicalFolder="/us" rootPath="/sitecore/content" startItem="/FOO/us" database="web" domain="extranet" allowDebug="true