Sitecore CMS and everything related RSS 2.0
 Monday, August 06, 2007

Just in case anyone else is wondering how to play with first bits of IronRuby and DLR, here's from John Lam himself:

Q: I am wondering if at all, i can see few working examples just like IronPython in asp.net futures section.
A: We're still quite a ways from ASP.NET. There are a lot of implementation details to sort out, particularly around how we deal with isolating concurrently executing pages from each other.

Monday, August 06, 2007 4:32:37 PM (FLE Standard Time, UTC+02:00)  #    Comments [0] -
Web development
 Thursday, August 02, 2007

As Peter was first to notice, we have recently made available a preview edition of the Search Engine Optimization module. It's purpose is to help website maintainers and contributors to get insight into SEO related aspects of the site and avoid common errors. To achieve the goal in a very visual way, the module embeds inself in live pages, similar to Sitecore WebEdit.

The only limitation of the preview edition is that it expires on January 1st, 2008. It is of fairly solid beta quality and is avaiable for a download from SDN free of charge, along with documentation. The earlier version is also preinstalled in the latest SC Printers demo site (version 3.0.15)

We're especially interested in feedback at this stage - good or bad, drop us a note: mail to ar at sitecore net, leave a comment or discuss at SDN forum.

To continue with the visual theme, below is a short tour:

Page Information provides a 'big picture' overview.

Page Information tab - displays page title, url, keywords and highlights errors

 

Text Only View shows the page through the eyes of a search engine. Headings are stressed by larger font size, links are underlined and image alt texts are displayed in [square brackets].

Text Only View tab - shows page content like similar to text browsers

 

Keywords shows statistics on how often 1, 2 and 3 word combinations are used on the page. It also allows quick search for any of the combinations on major search engines.

Keywords tab showing statistics on keyword density

 

Headings, Images and Links list all respective elements found on the page, along with some quick information. Clicking on any element highlights it's actual position on the page.

Images tab, showing thumbnails of all three images found on a page along with alternate text, url and dimensions  

 

Errors are easy to spot. They show up on the overview tab and the respective element tab. The coolest part is that the element itself is marked as erroneous on the page itself. Hovering over error marker displays the error information tooltip. The module also checks for broken links and presents them in the same way.

 

Hope you like it. For more information, please refer to SDN documentation.

Thursday, August 02, 2007 5:14:21 PM (FLE Standard Time, UTC+02:00)  #    Comments [1] -
Search Engine Optimization | Sitecore
 Monday, July 23, 2007

We've got a several reports about SDN5 being unresponsive, throwing Application Unavailable errors and having poor search quality in the last several days. From what it looks like, it's another windows update that became evil.

Symptoms: random "Application Unavailable" screens caused by worker pool restarts.

To diagnose the error, open the Event Viewer and look for the error below, following by a notice that asp.net was stopped unexpectedly:

EventType clr20r3, P1 aspnet_wp.exe, P2 2.0.50727.832, P3 461ef1db, P4 system.web, P5 2.0.0.0, P6 461ef1d2, P7 297c, P8 8d, P9 system.nullreferenceexception, P10 NIL.

The solution for me was to uninstall the Security Update for .NET Framework 2.0 (KB928365) and then repair the .net framework 2.0.

Unfortunately the update was pushed to fix a critical remote code execution vulnerability - so I'm not really happy with the solution, hope the new update is out soon. SDN5 runs on older Windows 2000, our newer Windows 2003 box is fine.

Found it by googling the error message, which lead me to the asp.net forum post regarding the KB928265 that also mentions that other possible issues. Internet is full of other fun ways this update breaks .net applications and reading through the reports is similar to browsing wikipedia - getting to the wet t-shirt contest page is only matter of time.

Technorati tags:

update: if you continue to see SDN fail with Application Unavailable - please let us know.

Monday, July 23, 2007 2:54:00 PM (FLE Standard Time, UTC+02:00)  #    Comments [0] -
Sitecore
 Thursday, July 19, 2007

 If the title sounds like I've made yet another barely useable app, it's wrong. This is what you can do with Developer Center in Sitecore:

  1. Start Developer Center
  2. Close all portlets / pages
  3. Add Content Explorer (View -> Content Explorer). You might also choose to dock it according to your preferences.
  4. [optional] Open any number of Content Editors for items by double clicking on them in Content Explorer. Could be useful as a start items, if you edit them often but adds startup time.
  5. Window -> Save Workspace.
  6. Ta-da: next time you need it, open Developer Center and choose Window -> Restore Workspace. Use Content Explorer to open additional tabs, for any items in any of the databases:

developercenter

Fineprint: Cross database editing is not 100% perfect - some things will still work as if you haven't switched the database.

Thursday, July 19, 2007 1:19:51 PM (FLE Standard Time, UTC+02:00)  #    Comments [0] -
Sitecore | 5.3 | Rich Text Editor
 Tuesday, July 17, 2007

contextual tab example - media tab is showing for all media itemsContextual tabs are the special ribbon tabs that are displayed only for specific item types. A good example is a Media tab which is displayed for all media items. Contextual tabs help reduce complexity and provide context-sensitive actions to the user.

I'll use our website as an example and will add a contextual tab to all partner items.

Designing the Ribbon

I'll design the ribbon first, which will be rather simple containing a single 'Open Website' button.

Note: It is essential to do this in the core database.

  1. Switch to the core database
  2. Open Content Editor and navigate to /sitecore/system/ribbons folder. I suggest that you create a subfolder and keep all your additions there for ease of future upgrades. I name the folder Website Contextual.
  3. Select New -> From Template and choose /templates/System/Ribbon/Toolbar template.
  4. Select the newly created item, then again New -> From Template and choose /templates/System/Ribbon/Strip template. Fill in header field (Partner)
  5. Repeat with /templates/System/Ribbon/Chunk template, also fill in header.
  6. Now create the item on /templates/System/Ribbon/Large Button template, fill in header, icon and click fields. The later defines the action to be performed on button click, by tying the button to a command. The template defines the look and behaviour of the ribbon element - in this case it will be a large button. After following these steps you should have the following setup:
    ribbon item setup

Adding the Ribbon to Content Items

When the ribbon is designed, it's time to setup content items to display it. In this example we're adding the ribbon to all partner items. Luckily for me, partners have own Partner template:

  1. Copy the ID of the Partner Toolbar item to the clipboard. Developer tab is super useful for this.
  2. Switch to the master database, navigate to the Partner template.
  3. Click "Standard Values" to edit standard values for Partner template. This will apply the changes we're making to all items on the partner template, including the ones that have already been created.
  4. In the View tab, make sure both Standard Fields and Raw Values are checked. Find the Ribbon field in the Appearance section and paste the ID you've copied in step 1:
    Ribbon field with ID set

Check if everything is set up correctly - refresh, select any item on the template (or the __StandardValues item) and you should see the contextual tab:

Partner tab showing up for __standard values item

The button doesn't do much, we'll fix that next.

Wiring up the Button

Last thing we're going to do is assigning action to a button - the example will open the partner website in a new window.

First, I create the following Command class:

namespace Sitecore.Website.Commands
{
   public class OpenWebsite : Command
   {
      public override void Execute(CommandContext context)
      {
         PartnerItem partner = context.Items[0];
         SheerResponse.Eval(string.Format("window.open('{0}', '_blank')", partner.Website.Url));
      }
   }
}

The Execute method gets the current item and then opens a partner website in a new window. What remains is to bind this class to "website:openwebsite" command which we assigned to the button.

Open /App_Config/commands.config file and add the following line:

<command name="website:openwebsite" type="Sitecore.Website.Commands.OpenWebsite,Sitecore.Website" />

Now it's all in place - restart and click the button to see it perform the action.

Design Considerations

When the new item is selected, the contextual tab will always be active instead of default one (Home). Be careful and do not overuse these - I'm not actually adding a tab to all partners only for the sake of 'Open Website' button, but it served well as an example.

If you do add the context tab, consider duplicating some most often commands from the Home tab. For example the Media tab repeats the Save button by using the 'Sticky Chunk' option on toolbar item:

image

Another option providing more control is using items of /templates/system/references template which provide "include" functionality for the ribbon.

 

Hope you find it helpful. Have any questions or requests to dig into these topics in greater detail - leave a comment or contact me: ar at sitecore net.

Tuesday, July 17, 2007 12:55:19 PM (FLE Standard Time, UTC+02:00)  #    Comments [2] -
Sitecore | Sheer UI
 Friday, July 13, 2007

image Added web 2.0'ish license agreement popups on SDN5: try any paid product download, like the Sitecore itself (SDN and download access required). It's not intended to hide actual download location, and in fact is unobtrusive.

Done with modalbox, which worked out well. The only issue we've spotted so far is that the page is moving underneath the modal overlay because scrollbar disapears in IE. Let me know if you see anything else.

[A classic "look what I've done post"]

Friday, July 13, 2007 12:12:08 PM (FLE Standard Time, UTC+02:00)  #    Comments [1] -
Web development
 Thursday, July 12, 2007

If you're lucky to have IIS6 serving your site, turning on the HTTP compression is a really easy way to decrease page loading times and cut bandwith. With compression enabled, web server can zip static and dynamic content before sending it over the wire. For this to happen the receiving side has to support compression too, as do all modern browsers.

There are two types of compression: static is essentially free. IIS will compress files on first request and store them on disk for future use, for minimal performance overhead. This works best for javascript and stylesheets. Dynamic compression allows .aspx output compressing; it's done on the fly and does add some CPU load. If processor isn't your bottleneck, enabling it is still a good idea.

For both types you need to define which file types should be compressed because the defaults are really lame: no css and no javascript.

On the new www.sitecore.net I've started with total frontpage load being 260kb and combining both compression types decreased it to 142kb. My favorite part is that prototype and scriptaculous (effects module only) javascript frameworks are 27kb total - at this point I refuse to take "prototype is too big" argument into consideration.

Useful links:

Thursday, July 12, 2007 6:11:50 PM (FLE Standard Time, UTC+02:00)  #    Comments [0] -
Sitecore | Web development
 Tuesday, July 10, 2007

With the website launch I've been in invisible mode recently - here's a small comments catch up.

Danjal Johan - "What happened to Lucene?"
Why isnt there any documentation\ no walkthrow\ nothing - regarding setting up the Lausane Search with Sitecore...
I been searching sitecore yahoo.groups and sdn5.sitecore.net.... its like no one wants to talk about Lucene - Did Lucene commit a crime - why is "she" the black sheep of the Sitecore familly???...

Danjal, Lucene article is in the works as I write this, hopefully it will fill some gaps in this area.

Robert Huynh - "HTML Editor line break":
This is great commentary and information. I ran into this problem while training our content editors on how to use the editor. I agree with you on this issue, thus, will make the change to our new Sitecore installation to default to a paragraph instead of a break tag. Thanks!

Robert - thanks for the feedback, I'm happy that it helped you buiding a better site with Sitecore.

Comments RSS feed.

Tuesday, July 10, 2007 10:38:34 AM (FLE Standard Time, UTC+02:00)  #    Comments [0] -

imageLess than a year from the last update, we've flipped the switch on the new public website this weekend. I hope you like it and find it better than the old one.

While it's not a total overhaul, I think it ended up being a major change. What I like about it is increased friendliness - more whitespace, text is easier to read and navigation is improved.

Some technical facts: the site is running on Sitecore 5.3.1 rev.070515 in a live mode. We use a simple two step "editing - published" workflow instead of publishing to control item visibility.

Your comments and criticism are very welcome, especially since I'm lucky to have people much more experienced in building websites reading this blog.

Tuesday, July 10, 2007 9:43:02 AM (FLE Standard Time, UTC+02:00)  #    Comments [0] -
Sitecore | Web development
 Monday, June 25, 2007

We've talked about setting the device programmatically and when it can be handy. Another trick that goes in the same category is layout substitution. Say we're building a mobile version of the web site and we want exactly the same set of sublayouts and renderings as in the desktop version, but placed on a different layout so that renderings can be rearranged freely using the placeholders.

Similar to the device resolver, we build a custom layout resolver processor to customize Sitecore's httpRequestBegin pipeline with out logic. The flow here is simple: if visitor uses handheld device, switch to a predefined layout. 

public class LayoutResolver
{
if (IsMobileRequest())
{
  using (new SecurityDisabler())
  {
    LayoutItem mobileLayout = Context.Database.GetItem(ID.Parse("{C10DBF03-F810-40A9-8ACB-5354428CC6BF}"));
    if (mobileLayout != null)
    {
      Tracer.Info("Overriding layout to mobile layout");
        // Change the layout to mobile layout  
      Context.Page.FilePath = mobileLayout.FilePath;
     }
     else
    {
// writes error to Sitecore trace, visible in debug mode

       Tracer.Error("Mobile layout not found");
    }
    }
}
}

Make sure to place your layout resolver after the standard one, so that you override Sitecore's choice of layout and not vice versa:

<processor type="Sitecore.Pipelines.HttpRequest.LayoutResolver, Sitecore.Kernel" />
<!-- Sets mobile layout for requests from mobile devices -->
<processor type="Sitecore.Website.Pipelines.LayoutResolver, Sitecore.Website" />

Monday, June 25, 2007 1:21:40 PM (FLE Standard Time, UTC+02:00)  #    Comments [0] -
Sitecore
Archive
<August 2007>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
2627282930311
2345678
Blogroll
 Alex de Groot
Few words about SiteCore from Holland
 Alexander Shyba
Sitecore Support
 Anders Dreyer
Anders Dreyer on Sitecore Development
 Jakob Christensen
Sitecore Core Development
 Lars Fløe Nielsen
Lars's ramblings about development and business processes
 Ole Thrane
Sitecore API
 Runi Thomsen
Runi Thomsen Sitecore Toughts
 The Sitecore Experience
The Sitecore Experience
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008
Alexey Rusakov
Sign In
Statistics
Total Posts: 199
This Year: 49
This Month: 3
This Week: 0
Comments: 0
Themes
Pick a theme:
All Content © 2008, Alexey Rusakov
DasBlog theme 'Business' created by Christoph De Baene (delarou)