sitecore7

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

Sitecore EventQueue Table growing out of control

旧街凉风 提交于 2019-12-31 11:00:23
问题 We are having an issue with the EventQueue table growing very fast at times, up to 3k records a second, and never clearing records (30 million as of right now). Our environment has the following set up: Sitecore 7.2 4 CD servers and 1 CM server All four CD servers are load balanced. CD1 and CD2 are pointed to DB1 server CD3 and CD4 are pointed to DB2 server There are 2 Publishing targets (one for each DB) Merge Replication is setup for the Core db across all servers (CM, CD's) EventQueue is

Sitecore Role Security Make Access Overriding Deny

微笑、不失礼 提交于 2019-12-30 10:38:22
问题 I have user roles that work as follows: Admin is a role in Manger which is a role in Logged in User. I want this to work this way so that if a user has an Admin role, then they will also have a Logged in User role. This reason for this is checks in the code. I don't really want to have to write something that incrementally checks each role to see if a user has access to something when I can just check if they are a Logged in User. Now I want to be able to apply security to sitecore items. The

how to customize publish action - sitecore

北城余情 提交于 2019-12-25 16:02:42
问题 I created a user in sitecore with 2 roles assigned to him i.e author and publisher When this user who is both author and publisher creates any content he shouldn't be able to publish it. Can i overwrite the publish action? check on the user who submitted the content and the roles he is assigned to and restrict him with a popup message or something like that? Any help is appreciated. Thanks. 回答1: Follow the below steps to write custom publish actions For customizing the publish action, Write a

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 Redirect module Regex Pattern Matching

北慕城南 提交于 2019-12-24 07:49:49
问题 Using the 301 Redirect Module for Sitecore 7, I'm having a problem establishing the proper Requested Expression and Source values to use in the Sitecore Redirect Module. I have an example url that is typically getting request that I want redirected to the home page of the site. The example url requests all contain excite.com at the end of the URL: https://www.example.com/products/foods/apples/excite.com https://www.example.com/products/foods/oranges/excite.com https://www.example.com/products

How to determine in sitecore whether given item is start item?

邮差的信 提交于 2019-12-24 05:05:39
问题 In config file we set start item for each website in element (e.g. startItem="/Home"). And we also can select start item in code. But what I am asking about is how to determine for any selected item whether it is start item or not? At least we can select start item and compare with given item, but it is not elegant code I think 回答1: We typically have an extension method on the SiteContext class to get the Home Item: public static class SiteExtensions { public static Item GetHomeItem(this

How to get a Multilist with Search field to not display referenced items' version and language?

家住魔仙堡 提交于 2019-12-23 15:33:41
问题 We are using Sitecore 7.2 to build a new application, and making extensive use of the new Multilist with Search field. We would like to be able to turn off display of the listed items' versions and languages in the list fields. How do we do this? Thank you. 回答1: For sitecore 8 and above versions left part of multi-list field is filled by Ajax response from javascript file. Below line needs to be modified your requirements, which is in websiteRoot/sitecore/shell/Controls/BucketList/BucketList

Sitecore Solr remove versions from index

天涯浪子 提交于 2019-12-23 08:29:31
问题 I’m using Sitecore 7 and the Solr Search provider. I currently have the site setup to update the search index when publishing an item. I’ve noticed that when the CMS author creates different versions of an item and then submits these into the index the previous version of the item is not removed from the index, so the index contains multiple versions of the same Sitecore item. Does anyone know of any settings, that I can change, to make sure that the previous version is removed from the index

Sitecore: Detect user in Page Editor mode

醉酒当歌 提交于 2019-12-23 07:49:51
问题 Can I know how to detect user is in page editor mode using code? This is because, I have a component, when user browses from page editor, it will search in master_index folder instead of web_index folder. 回答1: Please check with : if (Sitecore.Context.PageMode.IsPageEditorEditing) also is working on Sitecore 6.6, it not depends on Sitecore 7. Please check also this Sitecore blog post by Martina Welander. To check if is normal page use: if (Sitecore.Context.PageMode.IsNormal) To check if is