What I need:
a Patern on view in Development
Fast View on Production
keep'n something..
COMMANDS
MACRO TAGS
MACRO END-TAGS
HOT MACRO PATERN
SHORT-CUT TAGS of “DIV”
SHORT-CUT NEXT-TAGS
COMMANDS
Include HOT(!hot!)
Include Partial(!inc!)
COMMANDS
Include HOT(!hot!)
Include Partial(!inc!)
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>
MACRO END-TAGS
- ,/
to pop-all end of tags
- ~/
to pop n-tags, depend on
how many tilde (“~”)
you put it on.
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;.....
HOT MACRO PATERN
Inside hot there some vars like:
- $0 .. $9 for parameter.
- name id class
- defined variable
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*
HOT MACRO PATERN
Inside hot there some vars like:
- $0 .. $9 for parameter.
- name id class
- defined variable
Defined variable:
- @samevar=..
- &uniqvar=...
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>
0 comments
Post a comment