Search

Is it possible to grab the creation date of an entry using the Reflection field?

i.e the date on which the ID of the entry was generated?

I have a list of already registered delegates and I need to re-save the entries with a new field, but I'm looking for a means to date the already created entries somehow?

System Dates Field?

The DS grouping and sorting doesn't work properly as I mucked it up a bit.

Is this available to the reflection field then? I can't add any new fields to the section.. only change the reflection fields expression.. {entry/system:date} ? or am I dreaming.

Also the repo for the systemdatesfield is error 404'd from http://www.getsymphony.com/download/extensions/view/26241/

Hmmm I think in Symphony 2.3 you can select in a datasource to have the Creation date, not sure if its available in the Reflection Field, but I would assume so.

Is it available to the Entry Object in the backend though? cos I don't need this for frontend functionality just reflect the system/creation date for the entry somehow to spit an Excel file of all attendees out.

As far as I know reflection field, mimicks exactly the front-end entry. I don't think I have one installed here to check...

Andy: http://symphonyextensions.com/extensions/systemdatefields/

The repository changed and was updated on the extensions site, not here (as I thought no one used here anymore).

Looking through the code for the Reflection Field, I don't think it does append the dates to the entry object, however, just add this chunk to the extension driver's getxPath method:

        $date = new XMLElement('system-date');
        $date->appendChild(
            General::createXMLDateObject(
                DateTimeObj::get('U', $entry->get('creation_date')),
                'created'
            )
        );
        $date->appendChild(
            General::createXMLDateObject(
                DateTimeObj::get('U', $entry->get('modification_date')),
                'modified'
            )
        );
        $entry_xml->appendChild($date);

Right below the $entry_xml->setAttribute('id', $entry->get('id')); line.

I'm going to submit this as a modification to the repository.

If you do the above, then the dates will be available in xPath from the following under the entry node

        <system-date>
            <created iso="2013-05-08T23:51:48+01:00" time="23:51" weekday="3" offset="+0100">2013-05-08</created>
            <modified iso="2013-05-08T23:51:48+01:00" time="23:51" weekday="3" offset="+0100">2013-05-08</modified>
        </system-date>

You beauty! Thanks John.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details