Extending the F# Template Engine

59 views
Skip to first unread message

Das Licht

unread,
Oct 19, 2018, 12:26:41 PM10/19/18
to Fat-Free Framework
Hello,
I have a question regarding this here :


There we have 
$html = (isset($args[0])) ? $args[0] : '';

So this is html which is provided by the f3 template enngine?

Where does the html come from when using t like this:

<image src="images/south-park.jpg" width="60" height="60" crop="true" />

Any practical exampple would be lovely, please <3

Thanks 
~ Marc 


ikkez

unread,
Oct 19, 2018, 3:57:21 PM10/19/18
to Fat-Free Framework
Hi. You're right that sample isn't very useful in that use case... and it even wasn't complete, so I have removed it now.
Actually it should have shown how to handle inner content / html from a tag, but I guess that would need another example.

a practical use case would be, to write an element that can have other elements inside. i.e. like

<google-map>
 
<location lat="12.123" long="53.633" />
 
<location lat="12.817" long="54.201" />
</google-map>

which can then render a static image of a map with defined marker on it

or another one is a markdown element:

<div>
 
<markdown>
# Headline 1

some test

-  one
-  two
-  three
 
</markdown>
</div>


I have already written than one.
Or you maybe just want to adapt on existing elements, i.e. like the <form> tag and add some magic.. I've done that too.

IMO, this feature is a killer :D
Reply all
Reply to author
Forward
0 new messages