Saturday 7th November 2015 13:45

Hi folks, I got dummy question: I don't want to dive into creating own module with this issue but need to do something like "Copyright © 1997-2015 Tribal Ltd" where 2015 is current date's year format (PHP function). But it seems like PHP tags don't work within zenario's Raw HTML module. So how to make it a live current year ?

Sunday 8th November 2015 22:14

I can think of two ideas:  - use Twig (which is in our Frameworks), a very simple language like PHP  - use the Copyright module, which is intended to do exactly this. Maybe Chris can check my logic here... Tony

Monday 9th November 2015 10:08

Hi there Jonny! If you're trying to make your own module, it should be quite easy to output a date at the end, e.g.public function showSlot() {        //Your code here!        echo '© ', date('Y'), ' my company';} You could also use Twig, e.g.:© {{'now'|date('Y')}} my company

Wednesday 11th November 2015 15:10

Thank you guys, so I used Example module 'Hello World' and added following:public function showSlot() { // jonny,  my copyright date(year) $start_year = 2014; $my_copy = "Copyright ". "&copy". "Jonny ". "&nbsp&nbsp"; echo $my_copy.$start_year." - ".date("Y"); } }

You must confirm your screen name on your profile in order to comment.

Please Login if you wish to add a message.