I have some html segments that are dependant on some values being set in the session, is it possible to condition the inclusion in some way, so that I don't end up duplicating a massive chunk of html code? Or maybe there's another way to go about this that doesn't involve html//1?
foo -->
html([
div(p('I''m always displayed')),
{
http_session_data(Data),
% some other logic
},
div(p('I''m only displayed when there''s session data'))
)].
The code fails: ERROR: [Thread httpd@9999_3] Failed to translate to HTML: http_session_data(Data)