Over the years I have seen a lot of different content storage and organization strategies in Sitecore for . Two of the most common strategies are
- folder tree based on GUID value parts and
- folder tree based on Date
Since these are the most common methods to organize data, I decided to come up with a solution that would let me reuse the folder creation methods and use it with any template. Surprisingly the task was fairly simple. All I had to do was use the Command Template in Sitecore and invoke a custom control. I’ll write a separate blog later explaining how the module works but for now here is a module that you can use on any Sitecore solution, it works with any template or branch and even lets you specify the folder template.
Upon investigation we found that Sitecore uses ComponentArt Grid to render the UI and it does not work well with minified scripts and css. I am not really sure why but we did fix it by modifying the MiniMe handler to only allow minification if context site is not the “shell” site. Here is what the code looks like.
Sitecore ships with an agent that can be used to publish a database periodically. The agent is defined in the web.config file.
<agent type="Sitecore.Tasks.PublishAgent" method="Run" interval="00:00:00">
<param desc="source database">master</param>
<param desc="target database">web</param>
<param desc="mode (full or smart or incremental)">incremental</param>
<param desc="languages">en, da</param>
The biggest drawback however is that the agent will publish at specified intervals. This might be a problem as publishing at every so many minutes or hours will force clear the cache and slow the system down.
In most cases you would want to publish at a specific time of the day. This is tricky as Sitecore queues up tasks and may not get to the task at the exact desired time.
If publishing at the exact same time every day is a must, you will have to create a windows scheduled task to trigger publishing. Here is an example module you could use http://sitecoreblog.alexshyba.com/2007/02/publish-at-specific-time.html
However if you wish to use Sitecore task scheduler and are okay with publishing around the same time here is how you can do it.
Scheduled Task Helper is a module that lets you manually run a Sitecore task defined under /system/Tasks node or an agent defined in the Sitecore config (it is a product of my frustration while debugging the scheduled task. Now I can run the task any time I want).
After installing the package you can access the module by navigating to Sitecore->All Programs->XCore Tools->Scheduled Task Helper
To run a task, please select the task (use shift key to select multiple) and hit Execute
If you have to design a solution to leverage all the features that DMS has to offer, the first thing you might do is, implement data sources for Sublayouts and move the content over to data source item(s). This definitely makes the page DMS friendly but makes website search results inaccurate and probably unreliable. This is because the default Database Crawler is designed to index all the fields that are defined on the item.
An easy solution to the problem is buying a third party tool that can crawl the website. But that would cost money and would make this blog irrelevant. So, here is one way of solving the problem.
1) Extend the default database crawler
2) Add checks to ensure that only items with layouts defined are being indexed
3) Get all the renderings associated with the item and index the fields of the data source item
4) Update search query to also query the newly indexed custom fields