Leo<HTML>

Defining own tags

Tutorial
Defining own tags
    Simple Tags
    Open-Close Tags
Creating Menu Trees
Maybe you wan't to define an email tag:

Example:

// The tag:
<email to="kingleo@gmx.at">

// The result:

This can be implemented quiet simple:

Example:
  
<define name="email" PAR_1=to> 
function email( to ) { 
  print( "<a href=\"mailto:\"" + to + "\">", to, "</a>" ); 
} 
</define> 
 
 

Now I'll explain how to implemented the example boxes I heavy used on this side.
To implement such a box you'll need an open and a close tag.

Example:

// the tag:

<example>
  bla bla bla bla bla bla  bla bla
  bla bla bla bal blab alblabl abl 
</example>



// the result

Defintion:
  
<define name="example" type="open_close_tag"> 
function example( text ) { 
 print( "<table width=\"100%\" class=\"table_example\">" ); 
 print( "<tr>" ); 
 print( "<td>" ); 
 print( "<pre class=\"example\">" ); 
 
 print( text ); 
 
 print( "</pre>" ); 
 print( "</td>" ); 
 print( "</tr>" ); 
 print( "</table>" ); 
 
} 
</define> 
 

That's it.


This page was created by King Leo . Page generator was Leo<HTML> version 0.99.0 .