Announcement

Collapse
No announcement yet.

Added a "Last Edited" Date

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Added a "Last Edited" Date

    I have received feedback that it would be a good idea to add a "Last Edited" date to each page so that returning customers will know when amendments have been made.

    Has anyone implemented this?

    John
    John Legg
    The Debug Store

    sigpic
    http://www.TheDebugStore.com

    #2
    Not sure this is a good thing - does anyone believe the dates and if it has not been changed in a long time will that devalue the content?

    You can add the date in a couple of ways using either jQuery or some PHP but due to the way Actinic handles templated layouts you could end up publishing new dates when the content has not been revised but a parent layout has for example.

    The easiest option is to manually enter the date or depending on the site a change log


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      Actinic actually stores this information in the database. The FileList table which has Date and sFilename fields.

      It would not be hard to write some PHP/SQL code that looks up the current page name in said database and returns the date. Something like (only lightly tested):
      Code:
      <actinic:block if="%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22%29%20AND%20%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e" >
      	<actinic:block php="true">
      		$answer = '';
      		$filename = basename('<actinic:variable name="SectionPageName" encoding="perl" selectable="false" />');
      		$connect = odbc_connect("ActinicCatalog<actinic:variable name="ECMajorVersion" encoding="perl" selectable="false" />","","");
      		$query = "SELECT [Date] FROM [FileList] WHERE [sFilename]='" . $filename . "'";
      		$result = odbc_exec($connect, $query);
      		odbc_fetch_row($result);
      		$answer = odbc_result($result, 1);
      		odbc_close($connect);
      		if ( $answer != '' ) echo "Updated: $answer";
      	</actinic:block>
      </actinic:block>
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment

      Working...
      X