This section is for Searchfit users who are generating static websites and who plan to convert to publish dynamic websites.
A Little Background
While the ultimate objective for dynamic publishing is to publish new sites, changes and updates instantly without the need for the generation process and to create a path for a theme capability, a transition from generated templates to dynamic templates needs to be considered. For this reason, much of the look and feel of existing templating is used. The dynamic template section looks similar to the Static and Mobile template sections.
Much of the existing static shortcodes will work within the dynamic environment, but it was necessary to create new shortcodes to replace static versions and to maintain some abilities currently afforded by current settings. For example, with static Searchfit developers use a setting to show breadcrumbs, but in dynamic Searchfit breadcrumbs are shown with a shortcode. The intention is to minimize the number of new settings.
Toggling between Dynamic and Static (generated) is possible. However, generations are required whenever toggling between publication methods. Toggling to Dynamic requires one generation to activate internal dynamic settings. Toggling to Static requires a generation because each html page needs to be created.
Custom Pages
Custom page are automatically set to Dynamic when the feature is activated. Pages will automatically render without any changes. If there is custom code in a custom page, this code may need to be edited to work in the Dynamic environment.
Creating Dynamic Templates
The Dynamic template section is always visible and accessible even when Dynamic is disabled. There are new templates for Dynamic:
Website – This is the equivalent to the Main Template in the Static templates.
Category Type View – This controls the entire layout of the AUTO_GENERATED_CONTENT output on the Category Type page.
Featured Content – This template controls output for these predefined product groups: New Arrivals, On Sale, Most Popular, Top Rated, Custom Product Group.
You can copy your existing Static templates and paste them into their corresponding Dynamic templates. Here are the direct corresponding Static to Dynamic templates:
Main Template > Website
Categories Menu > Menu
Category View > Category View
Cart Content > Cart Content
Manufacturer View > Manufacturer View
Product View > Product View
Main CSS > CSS
Here are the changes that you will need to make:
Product View:
Create two product templates; one for your Brief Product View and one for your Detailed Product view. The Dynamic templating does not combine these two templates into a single template as the Static system did. Later you will assign each template to its view in the settings.
Menu:
The AUTO_GENERATED_MENU_XX shortcode needs to be replaced with this new shortcode: AUTO_GENERATED_MENU_WEBSITE_XX
Category Types:
This is a new template. It allows more control over the category type description field and requires a shortcode to show the list of categories on the page.
DYNAMIC_INCLUDE(MENU_FILTERS, hideBreadcrumbs=1) – this will hide breadcrumbs.
STATIC_INCLUDE(GetBreadcrumbs, showHomeLink=true) – this returns breadcrumbs.
AUTO_GENERATED_CATEGORYTYPE_DESCRIPTION – this returns the content from the AUTO_GENERATED_CONTENT (above categories) field
STATIC_INCLUDE(GetCategories, categoryTemplateType=categoryInListView.Dynamic) – This shows the list of categories. The Category Template will be applied in the setting to structure and render the list.
STATIC_INCLUDE(PRODUCTS_GROUP, productGroupType=AutoDetect, maxItems=24, disableCascadeCategories=1, loadMoreItemsActionId=loadMoreCategoryProductsAction, productTemplateGridViewType=briefProductView.dynamic) – This shows a list of products when a category with products is viewed. If a category with sub categories is viewed, the sub categories are shown.
Category View
AUTO_GENERATED_CATEGORY_DESCRIPTION – This shortcode will return the content from the AUTO_GENERATED_CONTENT (above categories) field
AUTO_GENERATED_CATEGORY_IMAGE – This will return the src for the category image.
STATIC_INCLUDE(GetCategories, maxItems=10, loadMoreItemsActionId=loadMoreCategoriesAction, categoryTemplateType=categoryInListView.Dynamic, onEmptyRemoveSelector=#categoriesContainer, onItemsEndRemoveSelector=#categoriesContainer .loadMoreBtnContainer) – This will list any sub categories that are under the category selected.
STATIC_INCLUDE(PRODUCTS_GROUP, productGroupType=AutoDetect, maxItems=24, disableCascadeCategories=1, loadMoreItemsActionId=loadMoreCategoryProductsAction, productTemplateGridViewType=briefProductView.dynamic) – This will list products that are assigned to the category selected.
Activating Dynamic Publishing
Once new dynamic templates are created, activating the feature is simple.
1. Go to Settings > Users. Then next to the user that is publishing the site check the box for Dynamic.
2. Next assign your templates to each section of the site. Once you activate Dynamic, a new tab is visible in the Settings > Configure Per User labeled “Dynamic” (not to be confused with “Dynamic Pages”).
3. Generate the site one time. This converts a few core files and activates dynamic behaviors. Future changes do not require generations.
Done.