-
Notifications
You must be signed in to change notification settings - Fork 9
Home
sfmskywalker edited this page Nov 10, 2014
·
5 revisions
- Ajax Widget <IDeliverable.Widgets.Ajax>
- Widgets Container <IDeliverable.Widgets>
- Widget Output Cache <IDeliverable.Widgets.OutputCache>
The Ajax Widget feature is an Orchard module that provides a content part called AjaxifyPart. To ajaxify your widgets and content items, follow these 4 simple steps:
- Enable the AJAX Widgets feature from the Modules section;
- Go to Content Definition -> Edit the content type you wish to add ajaxify support for and add the AjaxifyPart. Note: this works for any content type:, including widget types;
- To ajaxify a content item or widget, simply go to its editor and check the newly added "Ajaxify" checkbox;
- That's it! If you now visit your site, widgets and contents for which you checke the Ajaxify checkbox will load asynchronously.
To use this module to implement donut caching on output-cached pages, perform the following steps:
- Go to Settings -> Cache (assuming you have the Outpout Cache feature enabled);
- Scroll down a little until you see the AJAX Widgets caption and its route (AjaxifyContent/{id}). To have your widgets and contents served by this route not being cached, specify an integer value in the Duration field. A value of 0 means that the ajaxified widgets and contents will never be cached. Any other value will cause the ajaxified content to be cached for that number of seconds.
The Widgets Container feature adds a new content part to the system called WidgetContainerPart. When you attach this part to your content type, you will be able to associate widgets with this content item. This way you won't have to create a widget layer per content item URL, which can greatly improve maintenance.
This feature enables output caching on a per-widget level. To use this feature, do the following:
- Enable the Widget Output Cache feature. This will add the OutputCachePart to the system.
- Go to Content Type Definition and edit the widget type you'd like to attach the OutputCachePart, for example Menu Widget, and attach that part.
- Go to Widgets and edit the widgets you wish to enable output caching for. You'll see a checkbox labeled "Enable Output Cache ".
- Done.