hiltyu.blogg.se

Web slices sites
Web slices sites







web slices sites
  1. #Web slices sites how to
  2. #Web slices sites code

The most important thing is the setup and GetServiceDefinition.

#Web slices sites code

You can see that the most of the code are just properties. String appUrl = UrlHelper.GetApplicationUrl() / Gets the service definition for the accelerator = "('" + serviceUrl + "') return false " String serviceUrl = UrlHelper.GetAbsoluteUrl(UrlHelper.AddParameterToUrl(UrlHelper.CurrentURL, "getsearchaccelerator", this.ClientID)) If (QueryHelper.GetString("getsearchaccelerator", "") = this.ClientID) If the accelerator request matches the ID of the control, SetValue("SearchMode", value.ToString()) Return CMSSearchDialog.GetSearchMode(ValidationHelper.GetString(GetValue("SearchMode"), "")) Return DataHelper.GetNotEmpty(GetValue("SearchResultsPageUrl"), mResultPageUrl) / Gets or sets the search results page URL SetValue("AcceleratorButtonText", value) Return DataHelper.GetNotEmpty(GetValue("AcceleratorButtonText"), ResHelper.GetString("")) / Gets or sets the accelerator button text Return DataHelper.GetNotEmpty(GetValue("AcceleratorName"), ResHelper.GetString("")) SetValue("AcceleratorDescription", value) Return DataHelper.GetNotEmpty(GetValue("AcceleratorDescription"), ResHelper.GetString("")) / Gets or sets the accelerator description Protected string mResultPageUrl = UrlHelper.CurrentURL Public partial class CMSWebParts_SmartSearch_SearchAccelerator : CMSAbstractWebPart The second one is the actual accelerator.

#Web slices sites how to

This one is actually a web part which shows you two things:įirst is how to produce an XML response from the web part without the need to have special page for it. The main thing I can think of regarding any web site is the accelerator for search, so I will provide you with one that can take advantage of our search, allowing the users to search through your web site just by selecting the text and selecting the accelerator for your search. You can find more about accelerators here: (VS.85).aspx The context can be selected text, it can be current document, etc. There is really nothing more in it, simple isn't it? The good thing is that you can do the same with web part zone, so you can have the web slice done very easily, built from several web parts.Īccelerator is basically a service which can use current context of the user as a parameter. If you do that and go to the live site (not preview, not CMSDesk, but strictly live site), you will get something similar to this: Now you can go straight to the web part properties and select the Web slice container for the web part (or even for the zone, the code can use both). So go to the Site manager and create a new web part container:Īnd that's it. Sounds familiar? Yes, it sounds like the Web part container, and this is exactly how we will do that. You can find more details about it here: (VS.85).aspxĪs you can see, the slice is just some specific container for the content that can be used by the browser to get the content. Something like the visual RSS feed, I would say. Web slice is a portion of the page which can be displayed separately in the web browser. I will show you how you can use them with Kentico CMS, and give you the exact components to do the same thing as I do. Internet Explorer came with two very nice features (among all the others), called Web slices and Accelerators. I have recently launched my new sample web site for all the blog post examples ( ) where I will show you the real-time examples of what I am writing here, so here is the first one. Long time and almost no posts, shame on me! I was very busy with development of the new version and other things. This post will show you how you can use the new features of Internet Explorer 8, called Web slices and Accelerators with Kentico CMS.









Web slices sites