I want a conditional in my .ss template for if a page was accessed via method=post.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
You would have to write your function in php and then call it from the template. The template has no control for this.
How do you 'call' php from the template then? Thanks.
You create a function in your Page controler, then call it from you template. Something like:
function IsPosted() {
// check and return false or true;
}
<% if IsPosted %>
...
<% end_if %>