1
Programmers corner / Re: Disable diff template inheritance
« on: August 17, 2012, 10:17:01 AM »{.if|{.length|%user%.}
|{:{.section||back=1.}:}
|{:{.redirect|/~login.}:}
/if.}
That's worked briliantly - I spent an hour and a half yesterday trying to mess around with some if statements but didn't get anywhere.
My understanding is that if the user variable is populated, i.e. logged in, then we go back to the original template section and ignore the rest of the diff template, otherwise redirect to the ~login page. I must admit it's taking me a little bit of time to grasp the syntax for HFS scripting - I've only ever worked with VB.
I discovered HFS yesterday and spent almost 8 straight hours playing with it to learn what I can do with it - it does exactly what I want in both simplicity and customization.
Thank you!