sitecore7

Sitecore, custom MVC controllers and routes

北战南征 提交于 2019-12-06 02:48:01
I have a website defined in Sitecore's site definitions. The path to it is /localhost/mysite/home . And it works. I need to create a custom controller to submit forms with an API bypassing Sitecore. So I have FormsController (inheriting from MVC controller) with an action named "Test" taking no parameters. I defined the route in the initialize pipeline like this: public class Initialize { public void Process(PipelineArgs args) { MapRoutes(); GlassMapperSc.Start(); } private void MapRoutes() { RouteTable.Routes.MapRoute( "Forms.Test", "forms/test", new { controller = "FormsController", action =

Upgrading sitecore 6.6 index configuration to sitecore 7 (using ComputedFields)

六月ゝ 毕业季﹏ 提交于 2019-12-05 06:48:27
Sitecore CMS+DMS 6.6.0 rev.130404 => 7.0 rev.130424 In our project we have been using AdvancedDatabaseCrawler (ADC) for our indexes (specially because of it's dynamic fields feature). Here's a sample index configuration: <index id="GeoIndex" type="Sitecore.Search.Index, Sitecore.Kernel"> <param desc="name">$(id)</param> <param desc="folder">$(id)</param> <analyzer ref="search/analyzer" /> <locations hint="list:AddCrawler"> <web type="scSearchContrib.Crawler.Crawlers.AdvancedDatabaseCrawler, scSearchContrib.Crawler"> <database>web</database> <root>/sitecore/content/Globals/Locations</root>

Can I programmatically escape dashes in Sitecore queries using FullPath?

冷暖自知 提交于 2019-12-04 04:45:46
I'm attempting to expand upon a custom Sitecore command to determine if the current item has a parent item matching a certain template id. I know the query should ideally be as simple as ./ancestor::*[@@templateid='{26710865-F082-4714-876B-D5E1F386792F}'] if the item is the context, or /sitecore/content/home/full/path/to/the-item/ancestor::*[@@templateid='{26710865-F082-4714-876B-D5E1F386792F}'] Unfortunately the item path includes dashes which need to be escaped like /sitecore/content/home/full/path/to/#the-item#/ancestor::*[@@templateid='{26710865-F082-4714-876B-D5E1F386792F}'] . However,

How do I get the value of a WFFM field as a tag and output it in a Sitecore DMS report?

不打扰是莪最后的温柔 提交于 2019-12-04 03:56:38
问题 If I create a Web Forms For Marketers form with Analytics enabled I can choose to add each field as a tag to a Visitor. I can't see how to configure which tag they should be added to, or even what the tag is called by default (I'm assuming a tag with the field name is created). I'd also like to know how to retrieve the tag data in a visit report (i.e. the one you'd get if you double clicked on a form submission in the Form Reports dialogue). I can see how to access plenty of inbuilt tags, but

When to definitely use SOLR over Lucene in a Sitecore 7 build?

大憨熊 提交于 2019-12-03 16:12:47
问题 My client does not have the budget to setup and maintain a SOLR server to use in their production environment. If I understand the Sitecore 7 Content Search API correctly, it is not a big deal to configure things to use Lucene instead. For the most part the configuration will be similar and the code will be the same, and a SOLR server can be swapped in later. The site build has faceted search page listing components on landing and on other pages that will leverage the Content Search API

The model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel', but this dictionary requires a model item of type 'X'

本小妞迷上赌 提交于 2019-12-03 15:57:06
I am building a solution with Sitecore 7 and ASP.NET-MVC 3 and trying to use a custom model class as described in this blog post by john west . I have seen several other questions here on SO reporting a similar error with ASP.NET-MVC (without Sitecore), usually related to passing the wrong type of object in controller code, or there being a configuration error with the \Views\web.config file, but neither seem to be the issue here. this issue is caused when you create a view rendering (possibly others but i haven't tried it) and you have not set up the model in sitecore, so sitecore is passing

Strange Timeout in Sitecore 7

北战南征 提交于 2019-12-03 15:04:17
I've been using Sitecore version 7.1 for a few months now and have noticed that the Sitecore client logs me out after being idle for around 20 mins. Also other users have reported these issues whilst content editing. I'm using Windows 7, IIS 7, .NET framework 4.5. I've checked the error log for anything and can see no obvious errors and the keepalive service is running - I get this information in the logs: ManagedPoolThread #14 12:47:24 INFO Scheduling.UrlAgent started. Url:http://testsite/sitecore/service/keepalive.aspx I get some of these in the log, but could this be related? WARN Memory

How to perform search for multiple terms in Sitecore 7 ContentSearch API?

♀尐吖头ヾ 提交于 2019-12-03 07:50:16
I am exploring the new Sitecore.ContentSearch "LINQ to Sitecore" API in Sitecore 7. It is my understanding that Sitecore recommends using the new LINQ API over the existing Sitecore.Search API, however, I am struggling to perform even the simplest of queries. Take for instance the following search query: "hello world" . Using the Sitecore.Search API, the terms "hello world" would typically be passed through a QueryParser which would result in documents matching the word "hello" OR "world". Documents containing both terms would be scored higher that those with just one. How does one perform

When to definitely use SOLR over Lucene in a Sitecore 7 build?

前提是你 提交于 2019-12-03 04:38:06
My client does not have the budget to setup and maintain a SOLR server to use in their production environment. If I understand the Sitecore 7 Content Search API correctly, it is not a big deal to configure things to use Lucene instead. For the most part the configuration will be similar and the code will be the same, and a SOLR server can be swapped in later. The site build has faceted search page listing components on landing and on other pages that will leverage the Content Search API buckets with custom facets The site has around 5,000 pages and components not including media library items.

Sitecore Solr Search Score Value

社会主义新天地 提交于 2019-12-02 17:09:24
问题 I am trying to get the score value for each returned result item but the problem is all items returned the same score value. I am using sitecore 7.2 site which was upgraded from sitecore 6.6. I am using solr version 4.10.2-0 The following is the code that I am using: var contentPredicate = PredicateBuilder.True<customSearchResultItem>(); contentPredicate = contentPredicate.And(p => p.Content.Matches(SearchKey.Boost(1.0f))); IQueryable<SearchResultItem> query = context.GetQueryable