December 9, 2010

dtSearch : Step 1 adapt your aspx

See also:

This is the first post of series to use dtSearch for sitecore step by step.

The first think you need to do when you use dtSearch is to adapt your aspx/ascx/html code.

Normally, you will adapt the Master page to include some special field or values. To do that you need to include some tags like this in the < head > of your html:

<meta id="scID" content="<%# Sitecore.Context.Item.ID%>" name="scID" />
<meta id="Title" content="<%# Sitecore.Context.Item["Title"]%>" name="scID" />
<meta id="scPath" content="<%# Sitecore.Context.Item.Paths.Path%>" name="scPath" />
<meta id="scLang" content="<%# Sitecore.Context.Language.ToString() %>" name="scLang" />

I think that it is a best practice to include these 4 tags (except if you are sure to not use the multilingual functionalities).

If you don’t specify anything else, the whole page will be indexed but, most of the time you don’t need to index the menus, the JavaScript, …

You may exclude some part of the code using these tags:
All the code between these 2 tags will be ignored by dtSearch.

That all for the general pages.


  1. I am trying to use the full version of dtSearch without the module... do you have any tips for that? I tried using the above and it did not seem to pull in the additional Meta Data.. do I need to do something different?

  2. How did you test wheter dtSearch pulled in the additional data? If you let the dtSearch crawler create an index, you should also specify the new fields that your have added in the metatags.