InsiteCreation 2010 Administrator & Developer's Guide
-
Upload
insitecreation -
Category
Documents
-
view
645 -
download
3
Transcript of InsiteCreation 2010 Administrator & Developer's Guide
0
Administrator & Developer’s Guide
Administrator & Developer’s Guide
2009, Insite Mitra Inovindo, All Right Reserved.
1
Administrator & Developer’s Guide
2 Installation
4 Understanding Channels & Users
14
16
24
42
Creating a User
Setting-up Approval Workflow
Template Development
Module Development
52 Listing Template Development
24 Built-in Templates
27 Template Files
27 Adding a New Template
28 Applying Your Template
30 Creating a Template
34 Placeholder Configuration
35 Template Stylesheet
36 Optional Themes/Skins
37 Creating a Template that
allows Online Design
40 Creating Multiple Designs
from a Single Template
42 Creating a Module
42 Embedding a Module
45 Creating an Advanced Module
53 Creating a Listing Template
2 Installing InsiteCreation 2010
7 Creating a Channel
9 Channel View Permissions
10 Example 1: Creating a Member Area
12 Example 2: Creating a Client’s Area
17 To Approve or Decline a Page
19 Site’s Language & Settings
Contents
19 Language Files
21 Mini Sites
21 Creating a Mini Site
2
Administrator & Developer’s Guide
Installing InsiteCreation 2010
InsiteCreation 2010 can be installed on most shared hosts or dedicated servers that support ASP.NET 3.5.
Below are the general installation instructions for a shared host.
A. Database Setup
1. Create a blank database in MSSQL 2005/later.
2. Run storeproc.sql in Query Analyzer against your newly created database.
3. Run ASPNET_REGSQL.EXE in the .NET framework 2.0 folder:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.x\ASPNET_REGSQL.EXE
Note that you don’t need to run ASPNET_REGSQL.EXE directly from your web server. You can use
any computer running .NET framework v.2.0 which has a connection (via internet or local network)
to your database server. The wizard that comes up will guide you through the setup.
B. Website Setup
1. Unzip InsiteCreation package.
2. Copy/ftp all files under the root of your website so that they can be accessed from:
http://YOURSERVER/
3. Grant ASP.NET “write permission” to the resources folder.
4. Open file web.config using your preferred text editor.
a. Update the database connection setting in the web.config file.
For example:
<connectionStrings>
<add name=”SiteConnectionString”
connectionString=”Data Source=DATABASESERVER;
Initial Catalog=DATABASENAME;
uid=john;pwd=123;trusted_connection=false;”
providerName=”System.Data.SqlClient”/>
</connectionStrings>
Installation
3
Administrator & Developer’s Guide
b. Specify your mail settings. For example:
<system.net>
<mailSettings>
<smtp [email protected]>
<network host=”mail.InsiteCreation.com”
password=”password”
</smtp>
</mailSettings>
</system.net>
c. Choose a folder in your web server and grant “write permission” to it.
Then set the FileStorage setting in web.config with the folder location. For example:
<add key=”FileStorage” value=”D:\secure_storage”/>
Note: For secure storage, we recommend that you choose a folder on your hosting server
that is not accessible through HTTP.
C. Finalizing
1. Open http://YOURSERVER/setup/default.aspx where you can specify admin password.
2. Remove the file http://setup/default.aspx from your server.
3. Installation is complete. Open http://YOURSERVER.
4
Administrator & Developer’s Guide
In InsiteCreation, content/pages are organized into channels. Channels can be created based on
departments in your company or organization. For example, you (as an Administrator) can create channels
such as “Accounting”, “IT Department”, “Support”, etc. You can even create channels for your customers or
clients.
Below is an illustration of a site structure with its channels:
Understanding Channels & Users
5
Administrator & Developer’s Guide
In an Article Portal, for example, you can create a channel for each author so that each author has its own
area in which to post articles.
In a Club Website, for example, you can create a channel for Public or Members only.
6
Administrator & Developer’s Guide
When creating a channel, the system will automatically create 6 roles for the channel to which users can be
assigned. For example: if we create a channel named “Members”, the following 6 Roles are created for it:
Members
Subscribers Subscribers have read-only access to the content of the channel.
Members Authors Authors can contribute content to the channel (Create a Page, Edit a Page, and Delete a
Page).
Members Editors Editors are the first tier of the approval workflow. Authors must submit their work for
approval. An editor may approve or reject content submitted by Authors.
Members
Publishers
Publishers are the top tier of the approval workflow. A page approved by an Editor must go
to the Publisher(s) for final approval and publication; if no one is assigned to this channel,
work approved by an Editor is published directly to the site.
Note: If no Editor or Publisher is assigned, Authors may publish their work directly to the
site.
Members
Resource
Managers
Resource managers are able to upload resources (images, media files, documents, etc.) to
the channel.
Members Module
Managers Module managers are able to embed modules.
Because users are assigned to specific channels, it’s easy to give site visitors access to protected areas they
need to see, while keeping them locked out of areas where they don’t belong.
Note that a user may have more than one role.
7
Administrator & Developer’s Guide
Creating a Channel
To create a channel, open your Dashboard, then select the Channels link.
1 Select Channels link.
Link to your Dashboard
8
Administrator & Developer’s Guide
4
Choose a default template for the channel from the drop-
down list. Templates are pre-existing documents that define
the layout and overall appearance of your web pages.
5 Specify who will be able to access/view the channel content by choosing from the View Permission
drop-down list. There are 3 options under view permissions for each channel:
• Everyone (Anonymous Users); will make the channel content accessible to the public.
• All Users (Registered); will make the channel content accessible to all registered users.
• Channel’s Users only; will make the channel content accessible only to users who are
assigned rights to this specific channel (users that have one of the 6 channel’s Roles listed
above).
6 Tick the Disable Collaborative Authoring checkbox if you want only the user who creates a
page to be able to edit that page.
7 Click the Create button to add your channel to the system.
2 All existing channels will be listed. 3 Enter a descriptive name for the
new channel.
9
Administrator & Developer’s Guide
Channel View Permission
When creating a channel, we have three options to allow public or restricted access to the content within
the channel.
The 3 types of channel access (view) permissions are:
• Everyone (Anonymous Users); will make the channel content accessible to the public.
• All Users (Registered); will make the channel content accessible to all registered users.
• Channel’s Users only; will make the channel content accessible only to users who are assigned
rights to this specific channel (users that have one of the 6 channels’ Roles listed above).
Below is a summary of user rights within channels.
As seen on the table:
• Anonymous users cannot view content within the channel when view permission is set to All Users
(Registered).
Only registered users may view the content.
This type of channel is useful if you want to create a member area on your website where
only registered users may access the content.
• Not all registered users can view content within the channel when view permission is set to
Channel’s Users only. Only users that have one of the 6 Roles in that channel may access the
content. This type of channel is useful if you want to create a more private area on your website,
where only certain users (not all registered users) may access to the content.
Anony-
mous
Users
Logged-in Users
Users
without
Role(s)
Users with Role(s)
Sub-
scribers Authors Editors Publishers
Resource
Managers
Module
Managers
Adminis-
trators
View
permissions
Everyone
(Anony-
mous
Users)
View View View
View,
Contri-
bute
View,
Approve/
Decline
View,
Approve/
Decline
View,
Contribute
resources
Embed
Modules All
All Users
(Regis-
tered)
- View View
View,
Contri-
bute
View,
Approve/
Decline
View,
Approve/
Decline
View,
Contribute
resources
Embed
Modules All
Channel’s
Users only - - View
View,
Contri-
bute
View,
Approve/
Decline
View,
Approve/
Decline
View,
Contribute
resources
Embed
Modules All
Note that if you are the only person who manages your website, after installation, you can just login as an
Administrator and start managing your website’s content. In this case, you don’t need to setup channels
and users.
10
Administrator & Developer’s Guide
Example 1: Creating a Member Area
When planning your website, you may want to make some content available to the general public, while
making other content available only to members, such as club members or website subscribers. The
following steps explain how to create a member area:
1
Create a channel and set View
Permission to All Users (Registered).
In this example, we named the
channel: Members.
2 Go to a page that you’d like to make viewable by members only. In this
example, the page chosen is members.aspx (Creating a page will be explained
in the next section). On the page channel information, click the Change link to
open the Change Channel dialog.
3 Change the page channel to the
new Members channel and click Save.
11
Administrator & Developer’s Guide
Note:
When creating the channel Members, the system will automatically create 6 Roles to which users can be
assigned:
• Members Subscribers;
• Members Authors
• Members Editors
• Members Publishers
• Members Resource Managers
• Members Modules Managers
Since the Members channel view permission is set to All Users (Registered), then all registered users
(regardless of their own roles) may also view the content.
If you want to allow only users from a certain role, see example 2.
4
When site visitors try to open the members.aspx, a login
form will be displayed, requiring them to enter a valid
username and password to access the page. Since the
channel view permission is set to All Users (Registered), all
registered users will be able to login and open the page.
12
Administrator & Developer’s Guide
Example 2: Creating a Clients’ Area
In much the same way that you might want to limit some content to all registered users, you may want to
provide your clients with a unique content area where they can securely view (or even modify) work in
progress, download project contracts, and access other sensitive documents. In this case, not all registered
users are able to open that area. Only users that are members of the Channel can open the area.
When this channel is created, the system will automatically create six roles to which users can be assigned:
1. Clients Subscribers
2. Clients Authors
3. Clients Editors
4. Clients Publishers
5. Clients Resource Managers
6. Clients Module Managers
1
Create a Channel and set View
Permission to Channel’s Users only.
This means that pages assigned to this
channel can be opened only by users
from this channel and not all
registered users. In this example, we
named the channel: Clients.
2 Go to a page that you’d like to make accessible only to your clients.
In this example, the page chosen is clients.aspx. On the page channel
information, click Change link to open Change Channel dialog.
3 Change the page channel
to the new Clients channel and click Save.
13
Administrator & Developer’s Guide
As a result, the page will not be visible on site navigation.
4
5 Your clients will need to be logged in first (via the login link or login form provided on the
site) to be able to see links to any pages assigned to the Clients channel. Site users that
do not have one of the six roles listed above will not be able to see links to the
clients.aspx. Even if they know the URL, they won’t be able to access the page.
14
Administrator & Developer’s Guide
To create a user, open your Dashboard.
1 Select the Users link.
Creating a User
15
Administrator & Developer’s Guide
A list of all existing users will be displayed on the Users screen:
2 Fill in the new user information
4
Select one or more roles you want
the user to have.
Click Create to add the user to the
system. The message “Your account has
been successfully created.” will be
displayed.
3
16
Administrator & Developer’s Guide
InsiteCreation supports approval workflow that consists of Editor and/or Publisher approval.
You can assign users either as an Editor or Publisher in a channel so that the channel has an approval
workflow, otherwise pages in that channel will be published directly without approval.
When editing page content, you have either a Publish button or a Send for Review button.
If approval is needed, the Send for Review button is displayed; otherwise the Publish button will be
displayed.
Publish Button Send for Review Button
Setting up Approval Workflow
17
Administrator & Developer’s Guide
To Approve or Decline a Page To see a list of pages which have been submitted for approval, open your Dashboard.
2 An Approval Assistant is also available to users with an Editor or
Publisher role. Try selecting the Approval Assistant link.
1 Users who have an Editor or Publisher role will be
able to see the list of pages which have been
submitted for approval. Note that if a page is
submitted, it is passed to the Editors first and then to
the Publishers. Publishers will not see the page here
until it is approved by an Editor.
18
Administrator & Developer’s Guide
You can also approve or decline a page by opening the page and using the Approve or Decline links in the
Page Info box.
4 Click the Approve button or the Decline button.
When a page is declined, the page is made available for the author to make revisions.
3
Select the page you
wish to approve or
decline from the list by
clicking the checkbox
next to that page.
19
Administrator & Developer’s Guide
InsiteCreation allows you to change the language (culture) of your site. Your site will render the text,
captions, date, and number format according to the selected language (culture). Go to the Dashboard and
select Update Site Settings.
Language Files
A culture in InsiteCreation requires language files. If you select a culture for your site that doesn’t have
language files, then the default English language files will be used automatically.
Language files are found in the following folders:
• <yourwebsite>/App_LocalResources
• <yourwebsite>/dialogs/ App_LocalResources
• <yourwebsite>/systems/ App_LocalResources
• <yourwebsite>/modules/ App_LocalResources
Language files (also called resource files) are files with the extension “resx” that contain language
translation of the application text or captions. You can translate the application panels of InsiteCreation by
adding your language resource files. To translate the panels to German for example, duplicate all resource
files in the above folders and add “.de-DE” to the end of the file name. For example:
account.ascx.resx
would be:
account.ascx.de-DE.resx
Site’s Language & Settings
2 Change culture setting here.
1 The Site Settings panel is
displayed.
20
Administrator & Developer’s Guide
You can then translate all the text or captions defined in the new resource files. The translation will be
applied automatically if the site has the culture setting set to German (Germany).
Below are some country codes you can use:
• da-DK - Danish (Denmark)
• de-DE - German (Germany)
• el-GR - Greek (Greece)
• en-US - English (United States)
• fi -FI - Finnish (Finland)
• fr-FR - French (France)
• it-IT - Italian (Italy)
• ja-JP - Japanese (Japan)
• nl-NL - Dutch (Netherlands)
• pl-PL - Polish (Poland)
• sv-SE - Swedish (Sweden)
• zh-CN - Chinese (People’s Republic of China)
• en-GB - English (United Kingdom)
• nl-BE - Dutch (Belgium)
• nn-NO - Norwegian, Nynorsk (Norway)
• es-ES - Spanish (Spain)
21
Administrator & Developer’s Guide
InsiteCreation allows you to create multiple mini sites with different languages (cultures). With this feature,
you can:
• Create multiple-language sites,
• Create mini sites for each of your company’s departments,
• Create mini sites for each of your club members,
• Etc.
The term “mini” does not refer to the size of the site. You are able to create as many pages as you like on a
“mini” site, just as you would on the main site.
Creating a Mini Site
To create a new site, go to the Dashboard, then select the Manage Mini Sites menu. Follow the steps
below:
1 Enter the Home Page for the
new site (ex. default-de.aspx for
German).
2 Enter a Description (i.e.
“Germany (German)”.
3 Enter the Instruction Text as it
will appear in the country
selection drop-down menu.
Note: The country selection
drop-down menu is displayed
on your site only if you are
using
placeholderCountrySelect on
your template (See Template
Development section).
Country Selection drop-down.
4 Select the relevant Culture from
the drop-down list. This will
determine the formatting of
numbers and dates on the site
and will apply language files if
available. If language files for the
selected culture are not
available, the default English
language files will be used.
Language files will be explained
further in the next section.
5 Check the Set Active
checkbox to make your new
site visible in the country
selection drop-down menu.
6 Click the Create button to
create your new site.
Mini Sites
22
Administrator & Developer’s Guide
7 A new site is now created. Try clicking the Go To link.
9 As you can see, the site is still empty. Before adding content, you may want to specify the
site name or logo to be displayed on the header, copyright info on the footer, and any
other design aspects.
Go to the Dashboard by selecting the My Dashboard link and then select the Templates
menu.
10 Click the Design link.
8 Now you are on the main page of your new site.
23
Administrator & Developer’s Guide
Here are some facts about a mini site:
• A mini site is created in the same location (domain) of your existing site.
• A mini site has a separate menu/navigation system.
• Each mini site has a role called “Site Managers”. You can assign users to this role to be an
administrator of the site.
Here you can specify the design aspects of your site. 10
24
Administrator & Developer’s Guide
InsiteCreation uses design templates to separate content from design. You can change the design of your
web page by applying a different template to the page.
Built-in Templates
Below are the built-in templates in InsiteCreation:
Template Development
Bubble 01 Bubble 02
Bubble 03 Clean 01
Clean 02 Clean 03
25
Administrator & Developer’s Guide
Flash 01 Flash 02
Flash 03
Fresh 01
Fresh 02
Gradient 01
Elegant 01 Elegant 02
26
Administrator & Developer’s Guide
Simple Blue Simple Green
Gradient 02 Simple 01
Simple Orange Simple Red
27
Administrator & Developer’s Guide
Template Files
You can create your own template(s) or use the built-in templates provided by InsiteCreation. You can also
modify the built-in templates to meet your needs.
A basic template contains the following files:
• default.master, main template file.
• default.css, a stylesheet for the template file.
• print.master, template for printer friendly page
• editing.css, stylesheet for WYSIWYG Editor
TIP: You can copy these files from any built-in template and modify them according to your site design.
Adding a New Template
Before we look further at how to create a template, the steps below show how to add a new template to
use in InsiteCreation.
1
InsiteCreation files
Templates are located in the templates
folder. Copy your template files here.
In this example, we named our new
template folder: simple_01.
28
Administrator & Developer’s Guide
Applying your Template
If you want to apply the template to all pages within a certain channel, go to the Dashboard and select the
Channels menu.
2 Go to the Dashboard
and select the
Templates menu.
Here you can register
the template. Fill in the
name and select the
folder simple_01.
Click Save to finish. Now the template is available
for use.
1
Click Edit on the channel in
which you want to apply
the template to all pages in
that channel.
2 Here you can change the
default template.
3
29
Administrator & Developer’s Guide
If you want to apply your template to a specific page, go to that page and edit it.
In the next section, we will look further into the main template file: default.master.
3 You can change the page
template on the Page
Properties dialog.
Click Edit to edit
the page. 1
2 Select Page Properties.
30
Administrator & Developer’s Guide
Creating a Template
Now we will look further at how to create a template. The main template file is the default.master file,
which contains mainly regular HTML code with placeholders for various elements (menu, title, body
content, etc). You can create and edit this file using any text editor. We would recommend that you use
Visual Web Developer which you can download from the Microsoft website.
Below are the basic requirements for the default.master template file:
1 It must inherit from InsiteCreation’s
BaseMaster class
2 A header element with the runat
property set to “server”
3 A link to default.css. You can copy & modify the
default.css from the InsiteCreation’s prebuilt template.
4 A Form element in the
form of <frm:Form ...>
5
Placeholders to display
title, body content, etc.
31
Administrator & Developer’s Guide
Here is a simple example of a template with more placeholders and previews:
32
Administrator & Developer’s Guide
Here is how your site would look with the template applied:
Besides the above placeholders, below are examples of other available placeholders you may use in your
templates.
33
Administrator & Developer’s Guide
Here are empty placeholders that
you can use for any purpose.
You can embed modules in all
these placeholders by clicking the
Add Modules link.
Note: placeholderBody is the
placement of page content.
placeholderMenu_Tree placeholderLoginForm placeholderPageTools
34
Administrator & Developer’s Guide
Placeholder Configuration
Several placeholders are configurable using the file: default.xml. This file is optional and can be added in
your template folder.
Here is the default.xml content:
Placeholder Configuration file
35
Administrator & Developer’s Guide
Template Stylesheet
The stylesheet for a template is called default.css, located in the template folder. In this css file,
placeholders can be formatted according to your site design.
TIP: you can use/copy the default.css from any built-in template and modify it according to your site
design.
36
Administrator & Developer’s Guide
Optional Theme/Skin
A skin is used to format several controls used in your website, for example: GridView, TreeView,
Calendar, etc. Skins are optional.
To create a Skin, create a folder under the App_Themes folder with the sama name as your template
folder. For example, if you have a template located at: <yourwebsite>/templates/simple_01/ you would
then create a folder: <yourwebsite>/App_Themes/simple_01/
TIP: You can copy SkinFile.skin from <yourwebsite>/App_Themes/global/ and modify it according to your
needs.
In the Skin folder, you can also have a stylesheet file and even an image folder. The stylesheet will be
applied automatically to your site.
Skin file
Image folder
Stylesheet file
37
Administrator & Developer’s Guide
Here is the Skin’s Stylesheet.css file:
Creating a Template that allows Online Design
Several built-in templates in InsiteCreation support online design. This means you can easily modify design
aspects of the templates using an online design panel without any coding required. Go to your Dashboard
and select the Templates link.
1 Try clicking the Design link on the
Gradient 01 template.
38
Administrator & Developer’s Guide
When placing your cursor into the Background Color textbox, a color picker is displayed which allows you
to choose a color easily.
2 The Design panel will be displayed. Here you can fill-in the header text
(site name), upload a header image, change the background, etc.
39
Administrator & Developer’s Guide
To create a template that supports online design, you need to add a few things in default.master and
default.xml files. To do this, follow the steps below:
Default.master
Then on the header section, add css rules for formatting body & header elements.
Default.master
As a summary, there are 5 elements required in the default.master file:
• pageBody
• panelHeader
• imgLogo
• litSiteName
• litCopyright
Finally, in the default.xml file, you must specify default settings for the
design elements above that will be used by the Restore Default
Settings button in the Design panel in order to return any changes
made back to their original settings.
1 Give an ID=”pageBody” to the BODY element
2
Create a Panel with the ID=”panelHeader”.
Give a CssClass=”header”. This is for the
header element.
4
Create a Literal control with the ID=”litSiteName”.
Give a default text, such as: your.website.name
This is for placing the header text/site name.
3 Create an Image control with the
ID=”imgLogo”. This is for placing a logo.
5 Create a Literal Control with the ID=”litCopyright”. Give a
default text, such as: @2010, Your Company Name…
This is for placing copyright info.
6
7
Here you specify a default
background image and color.
Here you specify a default
header.
40
Administrator & Developer’s Guide
Creating Multiple Designs from a Single Template
A template which supports the online design feature is able to be used to create multiple templates with
different design settings. For example, you store your template in the folder: gradient_01 and then register
the template by giving it a name: Gradient 01.
After saving, the template is registered and by using the Design panel, you can modify the design aspects of
this template.
8 Here you specify the default
settings of the design elements.
41
Administrator & Developer’s Guide
InsiteCreation allows you to create another new template by using the same gradient_01 folder. For
example, you give a new name: Gradient 01 new.
As a result, you now have another new template in which you can specify different design settings in the
Design panel. With this feature, a single template can produce multiple templates with different design
settings.
1 Different Name
2 Same folder
42
Administrator & Developer’s Guide
Creating a Module
A module in InsiteCreation is simply an ASP.NET (ascx) User Control. You can find many references on the
internet about how to create ASP.NET User Controls. With ASP.NET User Controls you can create any
application and embed it onto any InsiteCreation page.
There is only one basic requirement for an InsiteCreation module:
Embedding a Module
First, you need to register the module.
A module should inherit from
InsiteCreation’s BaseUserControl
class. This line is a must. 1
1 Copy your module file into the modules folder on your
website. In this example, the module file is
helloworld.ascx.
Module Development
43
Administrator & Developer’s Guide
Now, your module is ready to use.
To be able to embed a module on a page, first go to the page where you want to embed your module. If
you have an Administrator or Module Manager role, you will see the Add module link.
3
Enter the module
name and the ascx
file name.
Click Save to finish.
To register the module,
open your Dashboard,
then select the Modules
link. A list of built-in
modules will be displayed.
2
44
Administrator & Developer’s Guide
4 Select the Add Module link to open
the Add Module dialog.
5
You will see your module is
listed here. Click the Add link
next to the module.
6 Your module is now embedded.
45
Administrator & Developer’s Guide
Creating an Advanced Module
Using modules, you can enhance your InsiteCreation website with added applications.
A module/application sometimes requires some settings. For example, if you want to create a Youtube
module, you would need to specify which video you want to display.
You can hard-code this information, but this can reduce the flexibility of your module.
InsiteCreation allows you to define your own variables in your module (for example: youtube video tag,
width & height of the video, etc).
Here is an example of a module that allows you to specify a Youtube Video tag.
By using custom settings (in this example: Video Tag, width & height of the video), you can use the same
module to display various Youtube videos with flexible dimensions for the video display.
For storing the settings data as well as reading it, InsiteCreation provides several methods you can use:
- SetModuleData()
- SaveModuleData()
- GetModuleData()
1 Video Tag from
Youtube.
3 The Video Tag
is entered in
the module’s
settings.
Youtube video will be displayed after saving the settings.
2
The Settings
link is displayed
on the module
to open the
Settings dialog.
4
46
Administrator & Developer’s Guide
Below, you will see how to create the Youtube Video module. We have named the file youtube.ascx.
Here is the full listing of youtube.ascx:
47
Administrator & Developer’s Guide
48
Administrator & Developer’s Guide
We will look further at the code below.
1 Prepare a placeholder for the module’s settings.
In this example, we named the placeholder ID:
“plhSettings”.
Create textboxes to
enter the Video Tag,
width, and height of
the video.
4 Add a Save button to save the Video Tag.
Use this block for the visibility settings of your module.
5 Add a link that will open
the Settings’ dialog.
6 Prepare a placeholder to show the module.
In this example we name the placeholder ID:
“plhModule”. 7
Here you can use Literal control to
display the Youtube video.
3
2
49
Administrator & Developer’s Guide
Now you can read the data from the
“VideoTag” variable. To read the data,
you use GetModuleData.
8 Listed here is the Save settings method.
InsiteCreation provides a SetModuleData method where
you can define a variable to store any data. In this
example, we named the variable “VideoTag”.
If you have more than one variable, you call this method
multiple times.
Here is an example:
Then SaveModuleData should be called to save the data.
10
11 Add this block for the
module’s visibility
settings (see step 3).
9
50
Administrator & Developer’s Guide
12
13
16
If the module setting hasn’t been specified,
do not display the module.
If Video Tag is specified, then you can
display the module/video.
Here you would need to specify who can
access the module settings.
The following is how to open the setting’s panel. Use the
method: mDialoginline and specify the panel Setting ID,
width & height of the panel dialog, and a title.
14
15 This block is required for
the module’s visibility
settings (see step 3).
51
Administrator & Developer’s Guide
If your module requires user authorization, you can check the user’s roles using the following properties:
- IsUserLoggedIn; checks if user has logged-in. Value: true/false.
Example: Me.IsUserLoggedIn
- IsPublisher; shows if user has a Publisher role. Value: true/false.
Example: Me.IsPublisher
- IsSubscriber; shows if user has a Subscriber role. Value: true/false.
Example: Me.IsSubscriber
- IsAuthor; shows if user has an Author role. Value: true/false.
Example: Me.IsAuthor
- IsEditor; shows if user has an Editor role. Value: true/false.
Example: Me.IsEditor
- IsResourceManager; shows if user has a Resource Manager role. Value: true/false.
Example: Me.IsResourceManager
- IsAdministrator; shows if user has an Administrator role. Value: true/false.
Example: Me.IsAdministrator
- IsReader; shows if user doesn’t have any role assigned or has a Subscriber role. Value: true/false.
Example: Me.IsReader
A custom module can also obtain several items of page/site information:
- PageID; ID of the current page where the module is embedded.
Example: Me.PageID
- Culture; Culture name of the current page where the module is embedded.
Example: Me.Culture
Sample value: ‘en-US’ or ‘de-DE’ (depends on the culture setting of the current site - See the
Sites & Localization panel)
- RootFile; Home page of the current page.
Example: Me.RootFile
Sample value: ‘default.aspx’ or ‘default-de.aspx’ (See the Sites & Localization panel)
- RootID; ID of the Home page.
Example: Me.RootID
52
Administrator & Developer’s Guide
Listings in InsiteCreation are template-driven. With a listing template you can format the look and feel of
your listing and specify its behavior.
Below is an example of the “Photo Gallery” listing template applied to a page:
Listing Template Development
53
Administrator & Developer’s Guide
Creating a Listing Template
To create a listing template, go to the Dashboard and select the Listing Templates menu.
1
2
Add a new listing template
here. Enter a name and
specify any existing listing
template to use as a base
template that you can
modify later. In this example,
we named the listing
template: File Explorer.
Click Save.
3
The File Explorer listing template is now
created. Click Edit to customize the
template.
54
Administrator & Developer’s Guide
13
4 Here you can configure the listing template.
A listing template contains 4 HTML templates:
- Header
- Footer
- Item (a recurring HTML to display listing entries)
- Script (can be used to embed javascript)
In item template, for example, you can add some
TAGS:
[%TITLE%] for displaying a title,
[%SUMMARY%] for displaying a summary, etc.
5 To create a File Explorer style of listing, enter this
HTML code in the Header field.
7 Try this HTML code in the Item field. This will
format each listing item to look like the
following:
6 In the Footer field, add closing tags for
the two DIV elements you added on the
Header. You’ll see later that this will
create a simple box where we will
display our listing:
8 The Calendar-based Listing feature is provided
to manage periodically updated content such as
newsletters, journals, blogs, etc.
Leave this setting unchecked.
9 The General Listing feature is provided to manage
general purpose listings such as directories, FAQ
pages, knowledge base pages, photo galleries, or
even e-commerce enabled product lists.
For this example, this option is checked.
10 There are 2 options for a General Listing page:
- Include listing entries in the sitemap
- Exclude listing entries from the sitemap
If you choose Exclude listing entries from sitemap, your
listing entries will not be displayed on the site menus.
This option is recommended for managing a large
number of entries. You will also be able to specify the
listing ordering.
11 The Use categories to organize listing
entries option allows you to organize
listing entries using custom categories.
You can leave this option unchecked.
12 Content Template is a template used to format page
content (title, body content, etc.). Use General Content
for basic formatting.
To modify Content Templates, go to your Dashboard, and
select the Content Template menu.
Click Save & finish.
Now, we are ready to use the listing template.
55
Administrator & Developer’s Guide
14 Try creating a new page and
check the “Make this page a
listing/gallery” option.
The “File Explorer” is available
on the listing templates
selection.
Choose this template and
publish the page.
15 On the newly created page try
uploading some files.
16 Finished! Here is the result.