ContractBridge.Net Homepage ContractBridge.Net
 

Help : How to Create New Results Pages

This page shows you how to create new results pages. It assumes you are using one of the standard contractbridge.net website templates.

Step 1: The Text File

Every session has a corresponding text file in the folder called _update_results. Go to this folder and create a new file with the name of the session, e.g. monday.txt. The file name should be all lower-case and not contain any spaces or unusual characters (underscores and hyphens are okay).

You don't need to put anything in this file, it can be completely empty. However it's not a bad idea to enter something like "monday results go here" — this will help you test the new page after you've completed the next step.

Step 2: The HTML Page

In the results folder (not the _update_results folder) you will find the HTML pages for each results session. The file names should be the same as those in the _update_results folder except they end with .html instead of .txt. You need to create a new page with the same name as the text file you created in the previous step (e.g. monday.html)

The easiest way to do this is to select one of the existing files by clicking the corresponding checkbox. Then click the "Copy" button below the list of file names. You will be prompted to enter a name for the new file.

Next, you need to edit the new page to fit the session. Most of this will be fairly obvious, e.g. changing the title of the page. However there is one very important thing that needs to be done in the HTML code (click the "HTML Mode" button to edit the HTML code). Look for the part of the HTML code which looks something like this:

<PRE>&nbsp;
<!--#include virtual="/clubname/_update_results/session-name.txt" -->
</PRE>

This snippet of code includes a reference to the corresponding text file. Change the name of the file in this code so it is the same as the text file you created. For example:

<PRE>&nbsp;
<!--#include virtual="/clubname/_update_results/monday.txt" -->
</PRE>

As always, remember to click the "Finish" button to save your changes.

Step 3: Links

You need to create at least one link from another page in your site so people can access the new page. Exactly how you do this will depend on how your site is set up, but it usually means adding a link to the navigation menu and/or the main results page. If you have trouble with this step please contact us.

Step 4: Test

Your new page should now be working. Go to your site and visit the new page — if you entered any text in the text file, you should see it appear where the results will be. If it's not there, or if you see an error message on the page, go back and check your file names and HTML code. It must be 100% correct or else it won't work.

Finally, publish some results using the normal method and check that it's all working okay.