[Gambas-user] Documentation about gb.web

Benoît Minisini gambas at ...1...
Fri Apr 4 20:36:41 CEST 2014


Le 03/04/2014 11:17, Rolf-Werner Eilert a écrit :
> Just browsed through the documentation for gb.web and this made me
> wonder:
>
> In the example on http://gambaswiki.org/wiki/doc/webpage
>
> aren't the two code snippets swapped? I mean, when I think about what
> the text says, this one
>
> <<Page title="Gambas WebPage Example">>
>
> <h2>Gambas WebPage are easy!</h2>
>
> <h2>Time is <%=Format(Now, "hh:nn:ss")%></h2>
>
> <</Page>>
>
> should be the includED page, the other one the includING one.

No. The 'Main.webpage' generated code *call*s the 'Page.webpage' 
generated code. So 'Page.webpage' is the included page.

It's just that the '<<--CONTENTS-->>' trick allows to use <<Page>> and 
<</Page> markups, and so allows the included page to generate HTML that 
surrounds part of the including page.

> In other words, the big one is the Main.Webpage and the small one the
> Page.Webpage. Or haven't I got it yet?

That's right. The big one is Main.Webpage.

Regards,

-- 
Benoît Minisini




More information about the User mailing list