-
Notifications
You must be signed in to change notification settings - Fork 10
inline_import
it4e edited this page Oct 4, 2016
·
2 revisions
<chl/chl.h>
[inline] import, import
import(path);
The inline CHL function import is used to fetch the contens of a file [path]. Should be called in an inline way, preferably inside of a view file.
- path: the path to the file
No return value.
main.c
#include <chl/chl.h>
#include <stdio.h>
int main() {
// Import view file
chl_view("index.vw");
}
index.vw (view file)
....
<body>
<{ import("hello.vc"); }>
</body>
....
hello.vc (view component file)
Hello world!
Output: .... <body> Hello world! </body> ....