maxhugen
Posts: 272
|
| Posted: 03/27/2008, 10:37 PM |
|
I'd like to add the current year to a copyright notice in a Footer page. I've read that the php for to get the Year is:
<?php echo date("Y") ?>
How should I add this to the php code view, and then get it to display in the html?
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
DonP
|
| Posted: 03/27/2008, 10:02 PM |
|
Just add a Label in the template where you want the year to be, then add
a Before Show event to the label with the code.
Don (DonP)
maxhugen wrote:
> I'd like to add the current year to a copyright notice in a Footer page. I've
> read that the php for to get the Year is:
>
> <?php echo date("Y") ?>
>
> How should I add this to the php code view, and then get it to display in the
> html?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
maxhugen
Posts: 272
|
| Posted: 03/27/2008, 11:29 PM |
|
Thanks Don
I added a Label: {CurrentYear}
Then for the BeforeShow event I selected 'Add code...' and put in the following:
//Custom Code @2-2A29BDB7
// -------------------------
// Write your own code here.
echo date("Y")
// -------------------------
//End Custom Code
I must have wrong syntax here, as LivePage throws an error....
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
wkempees
Posts: 1679
|
| Posted: 03/28/2008, 2:41 AM |
|
//Custom Code @2-2A29BDB7
// -------------------------
// Write your own code here.
$Component->SetValue(date("Y"));
// -------------------------
//End Custom Code
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 03/28/2008, 5:24 PM |
|
Thanks Walter!
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |