sitecore6

Does @@parentid attribute work in Sitecore query?

假如想象 提交于 2019-12-12 16:15:51
问题 Sitecore reference talk about some attributes you can use in Query, including @@templatename, @@id and @@parentid etc. parentid doesn't seem to work - /sitecore/content//*[@@parentid!=''] never returns any result. While /sitecore/content//*[@@templatename!=''] works fine. Sitecore version is 6.5 and 6.6. Has anyone been able to query with @@parentid? ( Perhaps it uses Ancestor/Descendant table and I'm missing data?? - just a guess ) 回答1: It is attempting to parse the value as a GUID and

Sitecore programmatically add layout. Value cannot not be null. Parameter name Path

偶尔善良 提交于 2019-12-12 14:54:35
问题 In my previous question I figured out how to add a layout programmatically in Sitecore, this works fine when the layouts and sublayouts are the same as the Standard Values. But when this is different I get a Value cannot not be null. Parameter name Path error. I am adding a layout programatically because the requirements are to add a mobile layout when a checkbox is checked. And remove to layout when the checkbox is not checked. I've searched on the internet and added the fix from Sitecore

Get Languages chosen for publish in publish:end event

隐身守侯 提交于 2019-12-12 14:29:01
问题 I made an event handler for the publish:end event - I'm able to get which item is being published - how do I get the languages the user chose in the publish options? 回答1: Figured this out - actually the publish:end event hits once for every language - and you get get the language that is being published by doing EventArgs[0].Options.Language 来源: https://stackoverflow.com/questions/12698876/get-languages-chosen-for-publish-in-publishend-event

How to generate media item link with id instead of path in Sitecore

廉价感情. 提交于 2019-12-12 11:06:39
问题 Anyone knows how to generate links in sitecore with ID instead of item path? If you use GetMediaUrl method from the API, I can get this URL: /~/media/Images/Archive/content/News and Events/News_and_Events_Level2/20070419162739/iwhiz3.jpg The problem with this approach is that if someone changes the media item name, removes it somewhere or deletes it, the above link will break. I notice if I insert a media link from rich text editor, I get the link as below: /~/media

Sitecore versioned image not loading

爷,独闯天下 提交于 2019-12-12 09:48:24
问题 I'm running Sitecore 6.5 and have a data template that has an image field and an item that's based on that template. The site had two languages. If I use a versioned image (one item in the media library with En and Fr versions) in the En and Fr versions of the item then publish the site and switch the language in the site using query string, sc_lang=en or fr, everything changes in the page except for the image. But if I use two different images (two items in the media library) then the

Why does Sitecore publish draft items from the C# API, and how do I stop it doing so?

别来无恙 提交于 2019-12-12 07:53:52
问题 I'm running a scheduled publish of my Sitecore master DB using the Sitecore publishing API. I call a web service at scheduled intervals during the day which runs the following code (slightly condensed for readability): // grab the root content node from sitecore Item contentNode = dbSource.Items[ID.Parse("{0DE95AE4-41AB-4D01-9EB0-67441B7C2450}")]; PublishOptions options = new PublishOptions(sourceDatabase, targetDatabase, PublishMode.Smart, lang, DateTime.Now); options.RootItem = contentNode;

Sitecore logs out when I select a message in ECM

妖精的绣舞 提交于 2019-12-12 04:48:32
问题 Whenever I select a message in ECM it redirects me to the login page of Sitecore with the following URL at the top http://example.com/sitecore%20modules/shell/EmailCampaign/UI/Dialogs/MessageBody.aspx?message={79D6412B-824A-4349-8B94-9136D17C6E84}&lang=en&contact=Emailcampaign\exampleuser_at_example_dot_com The following are the things I know about this issue: Though this happens most of the times, Sometimes it will work for the same message and for the same preview user (For the contact

Sitecore internal links to media files?

假如想象 提交于 2019-12-11 23:30:36
问题 In a Sitecore 6.5 solution, i have the following; <sc:Text runat="server" Field="bodyText"/> and Sitecore.Context.Item["bodyText"] I use the latter many places in the solution - the first not so much. I have now discovered that when using the latter, all links to the medialibrary is in the format ~/media/31F0E8084F9443789F25836A2B285D3E.ashx even though Media.UseItemPaths is set to true in the web.config. However, when i use the first mentioned method <sc:Text /> the links to medialibrary

Cannot get a Sitecore form to display in a placeholder (Web Forms for Marketers module)

给你一囗甜甜゛ 提交于 2019-12-11 21:46:20
问题 I'm busy writing a sitecore solution to manage a news site. I have a NewsArticleLayout (used to display a NewsArticle item), with a NewsArticleMailPlaceholder which I want to use to display a form where a user can enter a name and email address where a news article link must be mailed to. On the NewsArticleLayout page is already a NewsArticleSublayout with a phNewsArticle placeholder, which is currently correctly displaying data related to a news article. When I try to link the form to this

Sitecore IFrame displays Page Editor ribbon

孤人 提交于 2019-12-11 19:12:43
问题 I am working on integrating an iframe to a Sitecore template. I have created the ASPX page and added that to the iframe in Sitecore template. (e.g. /sitecore/content/Custom Editors/SampleIFrameEditor ) It works fine, I can see my ASPX page gets rendered in the iframe control. Only issue is that it shows the "Page Editor" ribbon control on top (Home Advanced Expereience...), which I do not need to be displayed. (It's like I opened it up in Page Editor.) How can I hide "Page Editor" options