sitecore

How to enter break in Sitecore RichText editor?

When I hit enter on a line in sitecore richtexteditor I get a new paragraph instead of line break. I can manually add it by editing html but how can I add line break in the Design mode itself? ...

Can I unit test a method that makes Sitecore context calls ?

I'm working on a web application that is built over Sitecore CMS. I was wondering if we could unit test for example a method that takes some data from Sitecore makes some processing with it and spits out a result. I would like to test all the logic within the method via a unit test. I pretty confused after searching the internet wide an...

Sitecore Workflow Items Stay in the Approved State

My problem is items that complete the workflow and get auto published still show a State of 'Approved'. Right now my users cannot edit items that are in this final state. Is there a way to make Sitecore clear the State field after auto publish or do I need to give every user permission for the 'Approved' workflow state? ...

How can I login programatically into Sitecore ?

How can I login programatiacally into Sitecore ? For example if you would like to connect a small part of the Sitecore API to a desktop application, you would need to login into sitecore first to access the databases etc. Can this be done ? ...

Sitecore query does not support count() function?

Sitecore query is based on XPATH, but looks like it does not support count() function. My query is this: ../*[@@templatekey='topic' and count(child::*) > 0] But gives me "Object reference not set to an instance of an object." error. But if I remove the count() filter, works just fine... Any idea why it doesn't like count? ...

how do I get the sitecore item Published Date?

Ho do I get the published date of a sitecore item? There are fields like '__created' and '__updated' but couldn't find anything for published date. I tried the following: Sitecore.Context.Item.Publishing.PublishDate But this only gives me date if I explicitly set it from the Content Editor. Basically I just want to print out the date ...

Problem with XSLT rendering HTML

Hello, I am writing an XSLT file to output some HTML onto a web page (using Sitecore CMS). I am running into a problem with the following: <a href="../videos/video.flv" class="videolightbox jackie-hover" data="{width:400,height:200}" title="Title goes here">Text goes here</a> This causes the following error: Expected token '}', found...

Visual Studio 2005 and SiteCore ...Very very slow

HI, We have Visual Studio 2005 and using Sitecore. In Sitcore solution we have different 4 projects. The problem is whenever I debug it takes much time to debug and then after debug when I run in browser it takes even more loonger time. I tried to clean the solution but did not work and I am trying to fix from many hours now and cannot...

Changing context element dynamically regarding some condition in Sitecore CMS

I have user control under Sitecore CMS. It has some controls bound to some fields of context. For example: <sc:text runat="server" field="HomePage_WelcomeText"></sc:text> I have different content items based on the same template and I need to change context to some of them in PageLoad(). For example, if URLRefferer has certain value I...

How to put Text over the Image in Sitecore?

I need to create user control where <sc:text/> element should showed over the <sc:image>. I know this can be achieved via CSS but in this case control cannot be configured as we cannot override inline styles. Any hints? ...

"sc.include" tag in Sitecore web.config

Can someone explain me how "sc.include" works? Can use it to include custom config files and handle it as usual custom section in .NET? ...

sitecore 6 debugging with visual studio 2008

Hi, I'm trying to debug sitecore 6 asp.net code using visual studio 2008 (Windows server 2003 OS), concretely i am trying to get breakpoints to work. I tried setting the breakpoint and then on VS, debug-> attach to process.. -> IIS web server process, but nothing happens when i browse to a certain aspx where a breakpoint is located at t...

Working with the Sitecore Calendar Module

Does anybody have any experience working with the basic sitecore calendar module? I'm playing around with the month view option and there are several things I'd like to change. Is there a way to add: < previous - month next > links so a user can click through the months? I may have missed this, but it doesn't seem to be a configurable...

Inhertiance of Layout Details on Template Standard Values

Hello, I have a template A which has several sublayouts and web controls assigned to the StandardValues for the Layout Details. If I inherit from this template and create a new template B it inherits all the layout details from A and displays fine. Now I had to change the Datasource for one of the web controls on template A. I selected...

Access Sitecore items via .NET web service

Has anyone had luck with using a .NET web service to access Sitecore items? I have a number of web applications on my server that are still in Coldfusion. I'd like to be able to call a web service to pull down items, but when I tried to do this I got an exception "Sitecore.Data.Items.Item cannot be serialized because it does not have a p...

Sitecore: Forcing pasting as unformatted text.

Is there a good way to force pasting as text inside Rich Text Fields inside Sitecore? I know there's a "Paste as Text" button in the Rich Text Editor itself, but content authors are almost definitely going to just hit Ctrl+V or Right-Click->Paste to put the text in, and if that content came from Word, all hell breaks loose with the marku...

Returning a list of items from Sitecore XSLT helper function

I'd like to return a list of items from an XSLT helper function in Sitecore. The items could conceivably be from multiple different places inside the content tree, so a simple XPath expression can't be used. I suspect that I need to do something with the XPathNodeIterator class, however I can't quite figure out how to create one that e...

Sitecore: Allowing a user/role to publish.

I'm in the process of implementing a workflow in Sitecore, and for that I have setup several different users with roles, where the security for the roles dictates the workflow process (nothing unusual). One of these roles is a "CMS Publisher", and its job is to be last in the review process and to publish the item once it is accepted. ...

Copy a field when creating a new version in Sitecore

I understand that the Unversioned and Shared checkboxes in Sitecore allow us to share a fields value across languages and versions. I was wondering if there is a setting that will allow me to copy all fields from the default language into the new language when I add a new language version? Thanks. ...

Axes.SelectItems() with DateTime based query?

Is it possible to do a date based query using xpath syntax? Everything I have researched inidicates that this is not possible. I am querying a group of calendars and only want to bring back a month's worth of data - what strategies could I use to accomplish this? 8/10/2010: Edit for more information I am building a notification system ...