Call 1-888-670-1652

 Spire CoreDB Connect Error (2002) Connection timed out

How To Add a Login to an Individual Page

Should you wish to password protect a page so that only certain users can access its content, in addition to creating a comprehensive external login page that is used for all pages within your website, there is the option of adding a login form to the individual page.

In order to do so, after creating the page, you will need to create two documents of content: one with the page's actual content and the other with the login form.

Creating the Page Content:

To begin, within the "Content Management" administration, select the desired page from the "Page Structure" hierarchy and open its "Content" tab.

!NEED SCREENSHOT OF SELECTING PAGE'S CONTENT TAB

Within the "Content" tab, you should see a table labeled "Documents for...," containing a single document, named "Base Document."

This document will be used to create the actual page of content, which will be accessed whenever users log in and the system determines that they have sufficient rights to view it.

!NEED SCREENSHOT OF CLICKING ON BASE DOCUMENT'S EDIT ICON

Click on the "Edit" icon in the document's row of the table, and, in the window that appears, simply enter the content that you would like to be displayed on the page, using whichever content editor you prefer ( WYSIWYG or Source).

!NEED SCREENSHOT OF EDITING CONTENT AND CLICKING PUBLISH

Once you are finished composing the page's content, make sure to select "Publish" at the top of the screen, and you can move on to create the login page.

Creating the Login Form:

In order to create the login form, return to the page's "Content" tab and click on the "Add" icon in the upper right-hand corner of the "Documents for..." table.

!NEED SCREENSHOT OF CLICKING ON ADD ICON

This will cause another document to appear in the "Documents for..." table, labeled "Content 2."

!NEED SCREENSHOT OF CLICKING ON CONTENT 2'S EDIT ICON

Click on the "Edit" icon located in the "Content 2" row of the "Documents for..." table, and, in the window that appears, select the "Source" editor tab in the upper left-hand corner.

Within the "Source" editor window, place your cursor in the location where you would like the login box to appear on the page (somewhere between the <body> and </body> tags in order to ensure it is within the page's body).

!NEED SCREENSHOT HIGHLIGHTING SOURCE TAB AND SHOWING PROPER PLACEMENT OF CURSOR

Once placed, click to open the "System" drop-down menu found in the toolbar at the top of the window and scroll down until you reach the "RMS Toolkit" section.

!NEED SCREENSHOT OF SELECTING LOGIN FROM RMS TOOLKIT SECTION OF SYSTEM MENU

From here, select "login" and the following tag will appear in the location where you placed your cursor:

<sys:login>
Name:
<input login-type='name' type='text'/>
Password:
<input login-type='password' type='password'/>
Remember me:
<input login-type='remember' type='checkbox'/>
<input type='submit' value='GO'/>
</sys:login>

The tag will generate a login form on the page consisting of two text-boxes (one labeled "Name:" and the other labeled "Password:"), a check-box labeled "Remember me:" that allows users to select whether or not they would like the system to remember their usernames, and a submit button labeled "Go."

!NEED SCREENSHOT OF EXAMPLE LOGIN FORM

In order to personalize the labels used in the form, you can replace the default text of "Name," "Password," "Remember me," and "GO" (within the <input type='submit' value='GO'/> section of the tag) with whatever text you would prefer.

Creating Login Error Messages:

In order to specify the error messages that will appear when, for whatever reason, the system determines that a user cannot successfully log in and access the page in question, you can make use of the sys:on-login-failure tag.

Simply place your cursor in the location where you would like the messages to be displayed - somewhere within the sys:login tag (generally after <input type='submit' value='GO'/> and before </sys:login>).

!NEED SCREENSHOT OF PROPER CURSOR PLACEMENT WITHIN THE SYS:LOGIN TAG

Once placed, click to open the "System" drop-down menu once again.

!NEED SCREENSHOT OF SELECTING ON-LOGIN-FAILURE FROM RMS TOOLKIT SECTION OF SYSTEM MENU

Scroll down until you reach the "RMS Toolkit" section, and select "on-login-failure," so that the following tag appears:

<sys:on-login-failure>Failed to log in.</sys:on-login-failure>
<sys:on-login-failure error='RMS_ALREADY_LOGGED_IN'>You are already logged in. Log out first to log in again.</sys:on-login-failure>
<sys:on-login-failure error='RMS_INVALID_PASSWORD'>Invalid user name or password.</sys:on-login-failure>
<sys:on-login-failure error='RMS_NOT_FOUND'>Invalid user name or password.</sys:on-login-failure>
<sys:on-login-failure error='RMS_DISABLED'>Your account was disabled by the administrator.</sys:on-login-failure>
<sys:on-login-failure error='RMS_TIMED_OUT'>Your session expired due to inactivity.</sys:on-login-failure>
<sys:on-login-failure error='RMS_EXPIRED'>Your account expired.</sys:on-login-failure>
<sys:on-login-failure error='RMS_KICKED_OUT'>Somebody else is using your account!</sys:on-login-failure> <sys:on-login-failure><aml:error>...</aml:error></sys:on-login-failure>

Feel free to replace the default messages ("Failed to log in," "You are already logged in. Log out first to log in again," "Invalid user name or password," "Your account was disabled by the administrator," "Your session expired due to inactivity," "Your account expired," and "Somebody else is using your account!") with whatever text your prefer.

!NEED SCREENSHOT OF EXAMPLE ERROR MESSAGES

Once you are done with this, click "Publish" at the top of screen.

Setting Display Conditions:

Once you are done creating the two documents, you will need to set display conditions, so that the system will know which document to display to users and when.

In order to do so, return to the page's "Content" tab.

Within the "Document Display Conditions for..." table, click on the "Edit" icon located in the "Base Document" row.

!NEED SCREENSHOT OF CLICKING ON THE EDIT ICON

In the "Groups" field of the "Edit the Condition" window that appears, move the names of the access groups whose members you would like to be able to view the page's actual content into the left-hand "Has Right" column.

You can move the groups by either double clicking on their names or using the arrow icons located in between the two columns.

!NEED SCREENSHOT OF MOVING GROUPS TO HAS RIGHT COLUMN AND HIGHLIGHTING "SAVE" BUTTON

Once this is done, click "Save" at the bottom of the screen and you will be taken back to the "Content" tab.

Back in the "Content" tab, click on the "Add" icon located in the upper right-hand corner of the "Document Display Conditions for..." table.

!NEED SCREENSHOT OF CLICKING ON ADD ICON

In the "Add New Condition" window that appears, select "Content 2" from the "Show Document" drop-down menu.

!NEED SCREENSHOT OF SELECTING CONTENT 2 FROM SHOW DOCUMENT MENU

Then, in the "Groups" field, move the "everybody" group to the left-hand "Has Right" column by either double clicking on its name or using the arrow icons located between the two columns.

!NEED SCREENSHOT OF MOVING GROUPS TO HAS RIGHT COLUMN

This will ensure that everyone who tries to access the page is presented with the "Content 2" document (the login page), unless they meet the conditions of the "Base Document" (the document with the page's actual content) by belonging to an access group that has been granted the right to view it.

Once this is done, simply click "Save" at the bottom of the screen, and you are all set.

!NEED SCREENSHOT OF CLICKING SAVE