Tuesday, 18 August 2009 16:45

Publishing Dynamic Content

Rate this item
(2 votes)

Installing the Journal Application


The application that we are going to use for creating regularly changing content is called the Journal portlet. First, you need to install this application on the ISI portal. Follow these steps to perform the installation:
 
1. Log on to the ISI portal using your Administrator account.
2. Create a public page called Dynamic under one of our communities, or at any other location of your choice.
3. Select the Add Application menu.
4. Locate the Journal application under the CMS category.
5. Add the application to the page.

Creating Article Structures

To create a new journal-article structure, follow these steps:
 
1. Click the Structures tab in the main application window of the Journal portlet. The screen shows a list of available structures. As no structures are currently defined, this list is blank.
2. Click the Add Structure button to create a new structure.
3. Take these actions on this screen:
a. Autogenerate ID: Each structure has its own unique ID. If you do not wish to track your own IDs, allow the application to autogenerate the IDs by marking this check box.
b. Name: Enter Announcement Structure.
c. Description: Enter This defines the structure for the announcement type of article.
d. Permissions: This section allows you to set various permissions at Community and Guest levels. Leave these at their default values.
4. Before you click the Save button, you need to define the XML schema for the structure. The schema defines the various fields to be included in the document. I will discuss this next.

Defining Your XML Schema

You can use one of two ways to create the XML schema that will contain the fields for our structure:
 
• Using the provided graphical interface
• Directly coding the schema definition in the provided XML editor

Using the Graphical Interface

To use the graphical interface to create the XML schema, follow these steps:
1. On the screen for creating a new structure, click the Add Row button under the second-tier XML Schema Definition tab. A new row with a drop-down list appears.
2. Enter Title in the edit box. This sets the title field for the content.
3. In the drop-down list next to the edit box, select Text as the content type. You have several choices for the content type; you will be using the other types soon.
4. Add one more field to the structure by clicking the Add Row button.
5. Name this field Description and set its type to Text.
6. Add another field called Image and set its type to Image.

Rearranging Schema Fields

You can easily change the order of the schema fields by using the two arrows shown next to each field. The down arrow moves the field down by one position and the up arrow moves it up by one position.

Adding Subfields

Each field can contain an inner field. To add a subfield, use the + icon to the right of the field name. You’ll now add two subfields to the Description field:
 
1. Click the + icon next to the Description field to add a subfield under it.
2. Enter Abstract in the edit box and select Text as the content type.
3. Click the Description field’s + icon one more time.
4. Enter Details in the edit box and select the Text content type. The Details subfield appears as the first one under the Description field.
5. Rearrange the two subfields using the associated arrows so that the Details field follows the Abstract field.

Removing Fields

If you wish to remove a previously added field or subfield, you can do so easily by clicking the – (minus) icon to the right of it. The corresponding field disappears from the structure.

So you can see how easy it is to define an article structure using the graphical interface. However, if you still insist on coding the structure, you can use the second method of creating it: using the XML editor.

Using the XML Editor

To use the XML editor to create an article structure, click the Launch Editor button under the XML Schema Definition tab. An editor window pops up on the screen. If you already created some of the structure using the graphical-interface method, the corresponding XML code for the structure appears in the editor

The editor provides two views for the code: Plain and Rich. You can add more fields and subfields to the structure by directly editing the displayed code in either of the two views. To do this, you must understand XML coding.

Once you’re satisfied with the changes, click the Update button to update the structure. Your changes will be reflected in the structure’s graphical view.

Viewing and Searching Structures

After you have created a structure and saved it, it will appear in the list of structures on the Structures screen in the main application view

If your structures list grows large, you might find it tedious to locate a desired structure. In that case, use the Search Structures button to narrow down your search and get a list of structures matching a given search criterion.

Using the Actions Menu


You will now be able to perform certain actions on these structures. To do so, click the Actions button to the right of the desired structure name.

You can perform these actions on a structure:
 
Edit: Clicking this menu option opens the current structure in the graphical editor. You can now modify the structure and update its definition by saving the changes.

Permissions: You can use this option to set various permissions for users with both Regular and Community roles.

Copy: This option allows you to create a copy of the current structure under a new ID

Add Article: This option allows you to add a journal article to the database using the currently selected structure. (I will discuss the article-creation process in the sections “Creating Journal Articles” and “Creating Template-based Articles.”)


View Articles: This option shows all articles using the currently selected structure on the Articles screen.

Add Template: This option allows you to create a new template based on the currently selected structure. I’ll explain the template-creation process in the section “Defining Article Templates.”

View Templates: This option displays all templates that use this structure.

Delete: This option removes the structure definition from the system.

Editing a Structure

In addition to using the Edit option in the Actions menu, you can also open a structure in the graphical editor by clicking its name in the structure list. You can now modify the structure’s definition and save it under the same ID.

Deleting a Structure

In addition to using the Delete option in the Actions menu, you can delete a structure definition by marking the check box to the left of the desired structure name and clicking the Delete button (see Figure 10-8). This removes the structure definition from the system.

So far, you have learned to create journal-article structures by defining the fields that the document will contain. Now we will look at how to define templates that use these structures. A template uses a structure to capture the data from the article author and defines the overall formatting of the article. The application will format each field in the structure using the formatting instructions defined in the template.

Defining Article Templates

To create a new template or to view the existing templates, click the Templates tab in the main application window

This screen displays a list of existing templates at the bottom. This list is currently blank because you haven’t yet defined any templates. We’ll remedy that now.

Adding a Template

To create a new template, follow the steps listed here:
1. Click the Add Template button.
 
2. Do the following things on the displayed screen:
a. Autogenerate ID: Mark this check box. The application will now autogenerate the ID for the new template.
b. Name: Enter Announcement Template.
c. Description: Enter This is a page template for the announcement type of journal article.
d. Cacheable: Leave this box checked (the default).
e. Structure: Click the appropriate button to select or remove the earlier selected structures.
f. Language Type: You get three choices here:
i. VM: Velocity is a powerful Java-based template engine. It renders data from plain Java objects to various formats.
ii. XSL: Extensible Stylesheet Language (XSL) is a language for expressing style sheets. Like CSS, it contains information on how to render an XML document.
iii. CSS: Cascading Style Sheets (CSS) is a widely accepted standard for creating style sheets to define how web-page information will be rendered.
g. Script: Specify the file that defines the template structure. Because you can create the template structure in VM, XSL, or CSS, you should select the appropriate file based on the language selection in the Language Type field. To locate the file on the system, use the Browse button. Alternatively, you can create a new file on the fly using the Launch Editor button.
h. Format Script: Mark this check box if you want to format your script. You must save the document by clicking the Save and Continue button or the Save button to see the effects of this action. The opportunity to format the script is especially useful if you created the script in an external editor and did not indent it properly.
i. Small Image URL: Specify the URL of the image to be used for identifying the template.
j. Small Image: Alternatively, you can specify an image from the local disk. To locate the image, use the Browse button.
k. Use Small Image: If you have populated the Small Image field, check this box.
l. Permissions: Use this section to set the various permissions for Regular and Community roles. For now, leave these at their default values.
3. Click the Save button to save your edits.

Viewing and Searching Templates

After you have created a template and saved it, it will appear in the list of templates on the Templates screen in the main application view

As in the case of structures, the view screen has a search facility that lets you narrow down the list of templates displayed. You can enter the search string in the Search edit box and click the Search Templates button to locate the templates matching the search criterion.

Performing Actions on Templates

The actions you can perform on templates are similar to the actions you can perform on structures:
Edit: This allows you to edit the selected template. Selecting this action opens the template in the editor, giving you the opportunity to edit any of the fields.
Permissions: This action allows you to set user permissions on the selected template for the Regular and Community roles.
Copy: This option allows you to make a copy of the selected template under a new ID.
Add Article: This action allows you to add a new article based on the current template.
View Articles: This option displays all the existing articles based on the currently selected template.
 
Edit Structure: A template uses a particular structure. With this menu action, you will be able to modify the structure that the current template is based on.
Delete: This action deletes the currently selected template from the system.

Editing a Template

In addition to using the Edit option in the Actions menu, you can also open a template in the editor by clicking its name in the template list. Then you can make modifications.

Deleting a Template

In addition to using the Delete option in the Actions menu, you can delete a template by marking the check box to the left of the template name and clicking the Delete button.

Creating Journal Articles

When you select the Articles tab in the main application view.

The Articles screen shows the list of currently available articles. This list is empty because you haven’t yet created any articles.

Adding an Article

To add a new article, click the Add Article button. Doing this pops up an editor that offers several options, each of which we’ll discuss individually.

Editing Content

The main portion of the screen is the editor for entering article data

On this screen, you would enter the following information:
• Name: Enter the article name here. This name will appear in the article list; it will also prove useful when users search for an article.
• Body: Enter the body of the journal article in the rich-edit control. You can format the text using the icons in the toolbar.
• Permissions: Use this section to set user permissions on the article for Regular and Community roles. You’ll find it under the rich-edit control on the article-addition screen.

Abstract

The Abstract option, under the Permissions section, allows you to add an abstract to your journal article.

Perform the following tasks on this subscreen:
• Description: Enter General announcement from ISI.
• Small Image URL: Enter the URL of the image that will be used to identify the current article in the article list.
• Small Image: Alternatively, enter the name of the image file from your local drive. You can use the Browse button to locate the file.
• Use Small Image: Mark this check box if you have populated the Small Image field.

Workflow

The Workflow subscreen at the top-right corner of the article-addition screen simply displays the current status of the article.

Form and Presentation

The Form and Presentation subscreen, under the Workflow subscreen, allows you to select which structure and which template you’d like to use for the current article

Click the Select button to the right of the Template option. Doing this displays a list of existing templates on the screen. When you select the desired template, the corresponding structure used by the selected template would automatically display to the right of the Structure option.

Categorization

You can set the article category on the subscreen for categorization

An article can belong to one of the following categories:
• Announcements
• Blogs
• General
• News
• Press Release
• Test

You will also be able to tag the article in this subscreen. You can tag the article with a preexisting tag or a newly created tag.

Schedule

The schedule subscreen, near the bottom-right of the article-addition screen,

In the Display Date field, you can set the date and time at which the current article will be made available to the portal members. The Expiration Date field allows you to set the date and time after which the article will no longer be available for viewing. If you mark the Never Auto Expire check box, the article will never expire and be available to members indefinitely. The Review Date sets the date for article review. Marking the Never Review check box indicates that an article review is not required for approval and publication.

Saving a New Article

After you’ve entered the desired information on the article-addition screen (see Figure 10-15), you get several options for saving the edits:
• Save: Clicking this button saves the edit, creates a new article with the given ID, and adds it to the database of the existing articles.
• Save and Continue: Clicking this button saves the current edits and keeps the editor open for you to make further changes.
• Save and Approve: Clicking this button saves the current edits and approves the current article for publishing.
• Preview: This option gives you a preview of how the article will look to the user.
• Download: This option downloads the article from the server.
• Cancel: This option cancels all the current edits and returns you to the main application screen.
 
 

Viewing an Article


After you create and save a new article, you will return to the main application screen, where a list of existing articles would be displayed

If you need to search for an article or articles matching a specific criterion, specify the search string in the Search edit box and perform the search by clicking the Search Articles button.

Performing Actions on an Article

You can perform the following actions on each of the articles displayed in the list:
• Edit: Selecting this menu option opens the article in the editor so you can make changes.
• Permissions: This option allows you to set various user permissions on the current article for Regular and Community roles.
• Preview: This option allows you to preview the article to see how it would be rendered on the user’s screen.
• Copy: This option makes a copy of the current article under a new ID.
• Delete: This option deletes the article from the database.

Assigning an Expiration Date for an Article

Over time, articles might lose their importance. You can set expiration dates on such articles so they’re no longer available for viewing. Do this by marking the check boxes to the left of the desired articles in the displayed list and clicking the Expire button

Deleting an Article

If you’d like to delete one or more articles, go the Articles screen and mark the check boxes to the left of the unwanted articles. Click the Delete button to remove them from the database permanently.

Viewing Recent Articles

After adding several articles over a period of time, you might want to obtain a list of only the recently added articles. When you click the Recent tab on the main application screen, you will see the list of recently added articles
You can also obtain the RSS feed of the articles by defining the feeds in the Feeds tab. The Feeds tab allows you to define feeds that will expose the existing articles using a set of rules such as constraints and presentation settings.

Last modified on Tuesday, 18 August 2009 20:56
Vicky

Vicky

E-mail: This e-mail address is being protected from spambots. You need JavaScript enabled to view it