Date function in heading

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
Tata
Posts: 2750
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Date function in heading

Post by Tata » Mon Aug 20, 2018 8:10 pm

Is it possible to have actualized date in a page heading?
There is a hidden page showing daily changing information. E.g.:

Code: Select all

<h1>program_page</h1>
and

Code: Select all

$page_data[]=array(...,'heading' => 'Program for today',...)
showing then
Program for today

The page is then shown in a newsbox and a printlik is placed on the page, so the visitors can print this very page (with its own stylesheet for "print").
It would be nice to have the heading like this:
Program for today - dd.mm.yyyy
If I understand the thing correctly, the function shall be only used in $page_data[]=array(...,'heading' => 'Program for today',...) as the call in template

Code: Select all

newsbox('program_page')
keeps pointing to the same page.
Is it very difficult to manage it?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 12719
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Date function in heading

Post by cmb » Mon Aug 20, 2018 9:30 pm

Not sure if I understand it correctly, but maybe you're looking for something like this:

Code: Select all

<?php echo '<h1>Program for today - ', date('d.m.Y'), '</h1>', newsbox('program_page')?>
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Post Reply