Jump to content

Templates in_dev mode


The Geek

Recommended Posts

Thanks Ales, ye - missed a few of those replies while I was typing mine :D

so {parse expression...} will effectively concatenate to the output?

Had to change:

&fk={parse expression="md5(IPS_UNIX_TIME_NOW);"}"





to

&fk={parse expression="md5(IPS_UNIX_TIME_NOW)"}"





Still fairly confused, but getting there thanks to you guys. I appreciate your help.

Link to comment
Share on other sites


Thanks Ales, ye - missed a few of those replies while I was typing mine :D



so {parse expression...} will effectively concatenate to the output?



Had to change:



&fk={parse expression="md5(IPS_UNIX_TIME_NOW);"}"





to

&fk={parse expression="md5(IPS_UNIX_TIME_NOW)"}"





Still fairly confused, but getting there thanks to you guys. I appreciate your help.



Ah that would have been a typo on my part (if you check out the Parse Tags link in my last post it details all the different parse tags that can be used including that one)
Link to comment
Share on other sites


Still fairly confused, but getting there thanks to you guys. I appreciate your help.




Any new system requires a learning curve (it's inevitable), but given your existing knowledge, I'm confident you will come to love how powerful the skin system truly is once you learn it.

You can create new parse tags just by dropping in php plugin files, you can execute raw php right in the templates, you can do a lot once you learn how the system works. And it sounds like you're just about there to be honest.

As Josh pointed out, PHP is *always* executed at the beginning of a php template. One common "gotcha" I run into (or see others run into) is doing something like this

<foreach loop="$test as $_test"> {$_test}: {$variable} </foreach>

<php>$variable = "a";</php>

This won't work as you expect, and the reason is that foreach loops actually compile into separate functions, so the variable isn't in scope. Easy work around is

<foreach loop="$test as $_test"> {$_test}: {$this->variable} </foreach>

<php>$this->variable = "a";</php>



(Assign as a class property so you can access from a separate function). Just throwing this at you now, cuz I expect you'd run into it yourself in short order.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...