SR2 SupportCenterCaps

Contact Support
 

Email:
support@refreshsoftware.com

Phone:
508-318-4480


  Link to this page

Home >  Developer Resources >  Developing Templates >  Registering Templates

Registering Templates

Registering the template with SR2 and associating with an Asset type:
 
1. Click on Workspaces. Then click on Asset Types/Templates.
2. Click on the Templates Tab in the right Window. 
3. In the name field, enter a name for the template; eg: Article
4. Description field is Optional.
5. In the filename field, enter the filename associated with the template (eg: Article.aspx)
6. Below this, a list of asset types is shown.
   From the list, choose the asset type[s] that you want to associate with the template.
7. Click on Save
 
Note: In step 5, you have to just specify the filename. No need to enter the full path of the file. The file need not exist within SR2 installation. If this is a jsp file, place it in a location where your webserver has access to. If it is an aspx file, place it in a location where your IIS is able to access and display it in your web browser.
 
 
Enabling preview functionality:
 
To enable preview for a content domain, follow these steps:
 
1. Login to master content domain
2. Select your domain name
3. In the preview root field provided, specify the URL. (eg: http://www.xyz.com)
4. Save it.
 
Now whenever you create an asset, at the bottom it lists all the templates you can associate with this asset.
Select one or more from that list and save it.
 
How does SR2 work for preview functionality?
 
When you click on preview button it will take the preview root you provided for this
content domain, appends the name of the template you associated with this asset and passes asset name and version number as the parameters to the template and renders that page in your browser.
 
Eg: preview root: http://www.xyz.com
    Associated template file: article.aspx
    pagename(asset name): pressrelease
    version num: 1
 
    For previewing the asset pressrelease, SR2 uses the following URL
 
    http://www.xyz.com/article.aspx?pagename=pressrelease&versionnum=1
 
For the preview to work, make sure you are able to view the asp or jsp page with the specified URL in your web browser.