Handbook
Glossary
required-attr ( tag name -- value )
Furnace framework
»
Furnace presentation layer
»
Chloe templates
»
Extending Chloe
»
Extending Chloe with custom tags
Prev:
CHLOE:
Next:
optional-attr ( tag name -- value )
Vocabulary
html
.
templates
.
chloe
.
syntax
Inputs
tag
a
tag
name
a
string
Outputs
value
a
string
Word description
Extracts an attribute from a tag.
Errors
Throws an error if the attribute is not specified.
Definition
USING:
kernel
sequences
xml.data
;
IN:
html.templates.chloe.syntax
:
required-attr
( tag name -- value )
[
nip
]
[
chloe-name
attr
]
2bi
or?
[
" attribute is required"
append
throw
]
unless
;