[Klone-users] Shared variables - Include KL1 page
Mickael Auger
mickael.auger at gmail.com
Tue Apr 29 09:56:00 EDT 2008
Hi,
A big thank you for this new version and the special mention.
I use :
- KLone 2.1.0
- Standard Linux
I would share many variables without use "session" variables.
I could use a custom global array but I think that there are not ?
To explain this with a real example, my variables contain a lot of word in
english (or in other language) that I want separate to C/HTML code to make a
web-site in different languages.
My 'language.kl1' file is
=====================
<%!
#ifdef ENGLISH
#define WORD "Hello"
#endif
#ifdef ITALIANO
#define WORD "Ciao"
#endif
%>
=====================
And my 'index.kl1' page is
=====================
<html>
<body>
<p><%= WORD %></p>
</body>
</html>
=====================
However, with this example, my variables are not declared to the compilation
of 'index.kl1'.
If not, can I include a KL1 page (with only a unique <%! ...%> tag) to share
the variables
Example :
My 'index.kl1' page (2nd version) is
====================
<%!
include("language.kl1");
%>
<html>
<body>
<p><%= WORD %></p>
</body>
</html>
====================
Thanks.
--
Mickaël AUGER
mickael.auger at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20080429/c5dbd61b/attachment.html
More information about the klone-users
mailing list