In this example you will make a new heading tag called "<HEADER>" with the following attributes:
ALIGNMENT = LEFT|RIGHT|CENTER (Enumerated value)
SIZE=Integer
REF=URL (i.e., location of a file (say))
Remember: This HEADER tag will not do anything to your browser. All you are doing is making PageWiz accept the HEADER tag as valid syntax. The Syntax Tag Manager is mainly used by companies that have their own tags defined for use by their custom browsers.
On the View menu, select "Resource Manager".
In the Resource Manager sub-menu, click "HTML Tags".
Click the Add/Edit Tags button
Click the Load Syntax File Button, .
Double click the user.stx file.
This opens the user defined syntax file ready for editing. If you havent already defined some of your own tags, the syntax file will be empty. However, the Syntax File Description (on the top right of the Syntax File Manager) will read User Defined.
The Syntax File Description appears in the tag filter. It allows easy identification of your syntax files.
Attribute Templates are lists of attributes that you commonly use. For example, the ALIGN=LEFT|RIGHT|CENTER is a common attribute. Rather than re-typing this attribute all the time, you can define it once and just drag it across to your Tag. In this example, you are going to create an ALIGN attribute template.
To begin, create a dummy tag to hang all your attributes off.
Click on the Attribute Templates window.
Click on New Template.
Under Name enter: DUMMYTAG.
Click Add >>.
Now add the ALIGN attribute to this tag.
In the Attribute Templates window, click on DUMMYTAG.
Click on Add Attribute.
Under Name enter: ALIGN.
Under Type click Enumerated.
Click Add >>.
This adds the ALIGN attribute to the Attribute Template. Now add some values to the attribute.
Click on the ALIGN attribute in the Attribute Templates window. This brings the ALIGN attribute to focus.
Click Add Enum Value.
Under Name enter LEFT.
Click Add >>.
Click on the ALIGN attribute in the Attribute Templates window. This brings the ALIGN attribute to focus.
Click Add Enum Value.
Under Name enter RIGHT.
Click Add >>.
Click on the ALIGN attribute in the Attribute Templates window. This brings the ALIGN attribute to focus.
Click Add Enum Value.
Under Name enter CENTER.
Click Add >>.
This completes the construction of the ALIGN Template. A description of its use is below.
When using PageWiz you will have noticed that when you hold the mouse over a tag or attribute, a description of that tag or attribute pops up. You can create your own descriptions here. For example, when a users holds the mouse over your ALIGN tag, you could pop up a message: Aligns the header left, right or center.
To do this:
Click on the ALIGN attribute in the Attribute Templates window.
In the description box, enter Aligns the header left, right or center.
Now it is time to add the HEADER tag to your syntax list.
Click on the Syntax File Tags window.
Click New Tag.
Under Name type HEADER.
Click << Add.
Adding the ALIGN Attribute is easy.
In the Attribute Templates window, click and drag the ALIGN attribute to the HEADER tag in the Syntax File Tags window.
The ALIGN attribute is automatically entered into the HEADER tag.
Click the HEADER tag in the Syntax File Tags window.
Click Add Attribute.
Under Name type SIZE.
Under Type, select Integer.
Click Add <<.
This means PageWiz will only recognize integer values for the SIZE attribute.
Click the HEADER tag in the Syntax File Tags window.
Click Add Attribute.
Under Name type REF.
Under Type, select URL.
Click Add <<.
This means PageWiz will only recognize a URL value for the Cap attribute.
Click the Save button at the top of the screen.
Congratulations!!! -- You have now completely defined your own tag.
Open a new web page, and type the HEADER tag. PageWiz will recognize it!!!
If you are using the HTML Property Sheet or the HTML Tags Manager you will notice that your tags attributes are ready to go.