Setting Counter Values

Example

Setting the counter on your home page to 1000.

MGI Tags

  • mgiCounter

Steps

  1. Create a counter admin page in a text editor.
  2. Insert the mgiCounter tag, name parameter and setCount parameter.
  3. Save the counter admin page.
  4. FTP the counter admin page to the web server running MGI.
  5. Access the counter admin page in a web browser.


Step 1: Create a counter admin page in a text editor.

Create a counter administration page in a text editing program. The counter administration page will only be used to set or reset counter values.

Step 2: Insert the mgiCounter tag, name parameter and setCount parameter.

Insert the mgiCounter tag, name parameter and setCount parameter. In the name parameter, enter the name of the counter to set. Counter names are case-sensitive. In the setCount parameter, enter a whole number. When the counter aministration page is accessed in a web browser, the counter value will be set to the number entered in the setCount parameter.
<mgiCounter name="index" setCount="1000">

Step 3: Save the counter admin page.

Save the counter admin page and name it "counteradmin.html".

Step 4: FTP the counter admin page to the web server running MGI.

Upload the counter admin page from your local computer to the web server using an FTP program.

Step 5: Access the counter admin page in a web browser.

Access the counter admin page in a web browser. When the counter page is accessed, the value of the counter on your home page is set to "1000" and the message "The index counter value has been set to 1000" is displayed. The next visitor who views the home page sees a counter value of "1001".


[Return to the Displaying Page Counters Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]