12. COMMANDS
Include HOT(!hot!)
Include Partial(!inc!)
13. COMMANDS
Include HOT(!hot!)
Include Partial(!inc!)
14. MACRO TAGS
begin with “%” and it can combine with:
One css selector of ID(#)
Multiple css selector of Class(.)
Costume Attribute ({})
Ruby code (=)
Ruby string (==) W2TAGS example:
Name Attribute (:)
%h1 List User
<h1>List User</h1>
%h2#title List User
<h2 id=”title”>List User</h2>
%h2#title.blink.light List User
<h2 id=”title” class=”blink light”>List User</h2>
15.
16. MACRO END-TAGS
- ,/
to pop-all end of tags
- ~/
to pop n-tags, depend on
how many tilde (“~”)
you put it on.
17. HOT MACRO PATERN
A defined patern of W2TAGS inside
HOT files, it can be like a TAGS:
begin with
>>tag_name
W2TAGS macro (it can multi line)
!~
(next tags)
<</
(end of tags)
See sample on the left, using it
- just like regular W2TAGS
%h1 Contacts
- or using “-”
-contact Widi Harsojo;.....
18. HOT MACRO PATERN
Inside hot there some vars like:
- $0 .. $9 for parameter.
- name id class
- defined variable
19. HOT MACRO PATERN
Inside hot there some vars like:
- $0 .. $9 for parameter.
- name id class
- defined variable
Var from name id class:
- $:
- $#
- $.
- *all*
- *opt*
- *id*
- *name*
- *class*
20. HOT MACRO PATERN
Inside hot there some vars like:
- $0 .. $9 for parameter.
- name id class
- defined variable
Defined variable:
- @samevar=..
- &uniqvar=...
21. SHORT-CUT TAGS of “DIV”
Short cut to DIV begin with css selector of
ID(#)
Class(.)
W2TAGS example:
#title List User
<div id=”title”>List User</div>