Skip to content

Instantly share code, notes, and snippets.

@iporsut
Created March 13, 2014 03:17
Show Gist options
  • Save iporsut/9521391 to your computer and use it in GitHub Desktop.
Save iporsut/9521391 to your computer and use it in GitHub Desktop.
Form Template
#set ($url = $request.get('render-url'))
#set ($namespace = $request.get('portlet-namespace'))
#set($currentUrl = $request.attributes.CURRENT_URL)
#set($paramName = $httpUtil.getParameter($currentUrl, "question", false))
#set ($friendlyUrl = $request.get('attributes').get('FRIENDLY_URL'))
<!-- BEGIN OUTPUT -->
##$question.getData()
$paramName
#if ($paramName != '')
Hello ${paramName}!
<a href="$url">Back</a>
#else
<form method="get" action="$url" name="${namespace}frm">
คำถาม:
<textarea name="question"></textarea>
<input type="submit" />
</form>
#end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment