sitecore-mvc

Implementing Breadcrumbs on Sitecore

半世苍凉 提交于 2020-04-19 06:18:30
问题 I just wanna ask if there is someone here that have already made a breadcrumbs in Sitecore. I'm currently doing a Sitecore 8 MVC project that needs to have a breadcrumbs. Currently I saw this website http://blog.ryanbailey.co.nz/2015/05/breadcrumbs-for-pages-in-sitecore.html. But It doesn't work for me yet because I don't know what to reference. I just need to know how to get every item in the path of my current page I can handle it already. Thanks 回答1: Something like this should do it:

Sitecore Prefetch Cache Size Different after upgradation

北城余情 提交于 2020-01-06 06:26:34
问题 I have done the Sitecore upgrading from 8.1 to 9.0 Update 2. I see there is an issue on the prefetch cache. On the old version the webdb prefetch cache will go till 6GB but on the upgraded version it is not crossing 1.5GB. Sitecore 8.1 Instance Sitecore 9.0 Upgraded Instance 回答1: There was a huge investment in caching architecture redesign, I'll bring up a few things that were changed: 1) Game changer - Sitecore.Interning.config that allows reusing repeatable immutable objects (like strings,

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

While Installing Sitecore Active Commerce-SC80 3.2, I get an error “Unable to load one or more requested types”

╄→гoц情女王★ 提交于 2019-12-25 09:15:46
问题 Following is stack trace: [ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.] System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0 System.Reflection.Assembly.GetTypes() +118 Glass.Mapper.Configuration.Attributes.AttributeConfigurationLoader.LoadFromAssembly(Assembly assembly) +172 [ConfigurationException: Failed to load types Could not load file or assembly 'Sitecore.Ecommerce.Apps, Version

Sitecore MVC form postback does not return a full layout

前提是你 提交于 2019-12-24 03:35:20
问题 i'm using Sitecore 7 with MVC enabled. I have a cshtml layout that has a header, menu, footer and placeholder in it. When i submit a form in the page with POST method, it gets to the controller and the controller is returning a viewresult for some reason only that particular html from the viewresult gets rendered to the page. Meaning that after doing a postback the header, menu, footer is gone and only the html from the result gets rendered on the page. Is this behaviour expected or am i

Sitecore MVC form postback does not return a full layout

て烟熏妆下的殇ゞ 提交于 2019-12-24 03:35:12
问题 i'm using Sitecore 7 with MVC enabled. I have a cshtml layout that has a header, menu, footer and placeholder in it. When i submit a form in the page with POST method, it gets to the controller and the controller is returning a viewresult for some reason only that particular html from the viewresult gets rendered to the page. Meaning that after doing a postback the header, menu, footer is gone and only the html from the result gets rendered on the page. Is this behaviour expected or am i

'System.Web.Webpages.Html.Htmlhelper' does not contain a definition for 'Sitecore'

前提是你 提交于 2019-12-18 12:55:18
问题 I'm getting this error in Visual Studio, when I use @Html.Sitecore : 'System.Web.Webpages.Html.Htmlhelper' does not contain a definition for 'Sitecore' and the best extension methods overload 'Sitecore.Mvc.HtmlHelperExtensions.Sitecore(System.Web.Mvc.HtmlHelper)' has some invalid arguments.` However, once deployed it does run without any problems. I'm using Sitecore 7.2 with MVC 5.1. Articles that I've read that deal with similar error messages, talk about the system.web.webPages.razor

Using Glass Mapper's @inherits GlassView<T> with MVC 5.0 views

淺唱寂寞╮ 提交于 2019-12-13 05:09:09
问题 I recently updated my solution to MVC 5 and I am facing the following issue. It appears as though I can no longer format the code in any of my Views that utilize @inherits GlassView<T> . By format, I mean auto-formatting using the CTRL + K + D key combination. When I press the format combination, the namespace and class name get lowercased and all references to Model appear to break. This only occurs on GlassViews... traditional Views using a @model declaration appear to be unaffected. Any

Sitecore MVC Ensure empty placeholder is selectable in experience editor

☆樱花仙子☆ 提交于 2019-12-12 18:16:48
问题 Is there some trick with placeholders in Sitecore MVC to ensure that they are always selectable in the page editor experience editor even when they don't contain any renderings? My controller rendering declares the placeholder in the cshtml view as follows: <div> <!-- some html markup and fields rendered here --> @Html.Sitecore().Placeholder("my-component-placeholder") </div> 回答1: To ensure placeholder visibility and selectability, you need to ensure the following: A placeholder settings item