Sometimes when a user clicks the Sitecore button » All Applications, the list of all applictions may be displayed behind the menu. This beahvior is described at the picture below:
This can be cured by completing the following steps:
Add the site to the list of the Trusted Sites as it is depicted below:
You can use the web.config ImageTypes setting to set an additional image extension for which the thumbnail will be generated:
<setting name="ImageTypes" value="|gif|jpg|png|tif|"/>
When you try running the code, the default context is set to the website.
This means that all database definitions are taken from the website web.config section:
...name="website"
virtualFolder="/"
physicalFolder="/"rootPath="/sitecore/content"startItem="/home"language="en"database="web"domain="extranet"allowDebug="true"cacheHtml="true"...
As can be seen, the content attribute is missing here, that’s why the content database is undefined. In other words, Sitecore.Context.ContentDatabase returns null.
So the following actions can be taken in order to solve the problem:
1. Change the context to the site where the content database is defined.
Here is statement to be used before calling Sitecore.Context.ContentDatabase property:
Sitecore.Context.SetActiveSite("shell");
or
Sitecore.Context.SetActiveSite("modules_shell");
2. Add the content attribute like it is shown below:
...name="website"virtualFolder="/"physicalFolder="/"rootPath="/sitecore/content"startItem="/home"language="en"database="web"domain="extranet"allowDebug="true"content="master" cacheHtml="true"...
In order to set up stating mode for a definite user, specify one of the following values in the "Start URL" field in the Properties window of the user:
Desktop - /sitecore/shell/default.aspxContent Editor - /sitecore/shell/applications/clientusesoswindows.aspxPreview - /sitecore/shell/applications/preview.aspx
Create a sublayout named “Document”, pass one parameter to it and performed publishing:
The following code...
Database db = Sitecore.Configuration.Factory.GetDatabase("master");Item item = db.Items["/sitecore/content/home"];
string rend=item.Fields["__renderings"].Value;LayoutDefinition layout = LayoutDefinition.Parse(rend);
DeviceItem dev = Sitecore.Context.Device;
DeviceDefinition device = layout.GetDevice( dev.ID.ToString());Item subl1 = db.Items["/sitecore/layout/Sublayouts/Document"];RenderingDefinition rendering = device.GetRendering(subl1.ID.ToString());Response.Write("Parameters: " + rendering.Parameters);
...should result the following output:
Parameters: sab=sabvalue
The register directive should be changed to the following:
<%@ register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Kernel" %>.
And all pages should be inherited from the System.Web.UI.Page class, rather than from the Sitecore.BasePage class.
Applied to Sitecore V5.1.x.
In order to get a list containing all the folder items in the media library and use it as a source for the Multilist field, you can use the following approaches:
query:/sitecore/media library//*[@@templatename='Media folder'] - Returns all items and all subitems based on the Media folder template. Note that the templatename attribute is case sensitive.
query:/sitecore/media library/*[@@templatename='Media folder'] - Returns all items under the root of Media library based on the Media folder template.
query:/sitecore/media library//*[@@templatekey='media folder'] - Returns all items and all subitems based on the Media folder template. Here is another approach using the templatekey attribute.
query:/sitecore/media library/*[@@templatekey='media folder'] - Returns all items under the root of Media library based on the Media folder template.
You may find this link useful as well: http://sdn5.sitecore.net/SDN5/FAQ/API/Lookups%20with%20XPath.aspx
Despite the simplicity of this solution, nevertheless I 've decided to publish it.
It is possible to accomplish this by modifying your web.config file.
You should add the contentLanguage attribute to the shell site in the section (it is shown in bold below):
contentLanguage="da"
Now your default content language should be changed to Danish.
There at least two ways to disable workflows:
1. Remove (or disable) workflowprovider in web.config for the master database:
2. Set enableWorkflow="true" for the site in web.config:
The key point to make a section visible is to make at least one section's field visible.
Here are a few steps how to achieve this.
1. Go to the Template Manager and choose the Standard Template for editing.
2. Within the Template Editor choose any field in a section.
3. Locate the "Field Security" in the Data section, not the Security section and ensure that the Everyone role doesn't have denied read permission and enable any other role (e.g. Editors) to read it.
4. You can do the same for other fields inside the section.
5. Save changes.
If you want to allow a user to edit the fields inside the section – just, using the described above technique, set Write permission for those fields to this user.
You can tune up appropriate commands under /content/system/commands in the core database to fit your needs.
Please look at the picture below:
As a result, the following can be observed for the developer user:
The matter is that you can assign the whole profile to a certain HTML field.
Go to the Template Editor, select a certain HTML field and fill the Source field with necessary profile.
Please have a look at the image:
We've got some cases regarding index problems. The possible errors that can be observed may look like the following ones:
Could not find file "C:\sitecore\SitecoreInetpub\indexes\master\system\_1jql.fnm".
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not find file "C:\sitecore\SitecoreInetpub\indexes\master\system\_1jql.fnm".
docs out of order
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.SystemException: docs out of order
This can be cured by completing the following. Rebuild your search indexes in the Control Panel (see the picture below):
If it doesn't help, try to manually remove all index files in the following folders:
In order to read creation date of a definite message stored in the Messageboard database, the createdelement value from the XML should be used rather than the created_dt value.
It has the following format:
created 7/1/2003 1:18:28 PM
It's much more convenient for the futher date formatting since the created_dt value does not contain any “pm” or “am” definitions.
Then you can apply suggested code snippet in order to change the date format:
string formatedData = dt.ToString("M/d/yyyy H:mm");