Announcement

Collapse
No announcement yet.

Last Updated Date

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

    Last Updated Date

    Hello,

    I am trying to show the 'Last Updated Date' on my product pages. (& todays date on the home page?)

    I am using the following info from the Actinic FAQ section which says to place the following code into Act_ProductBody.html.

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!-Begin
    var dateObj = new Date(document.lastModified)
    document.write("Last Updated: " + dateObj.toLocaleString());
    // End -->
    </SCRIPT>

    However it doesn't matter where I put this code within Act_ProductBody.html - it doesn't seem to work.

    Can any code breakers/Java/Actinic experts out there tell me if I'm doing something wrong..?

    Thanks
    Jackie
    Original gifts for all occasions by British Artists and Designers

    http://www.giftedindesign.co.uk

    #2
    Have you tried the Act_Primary template as this is the main template for all pages of the site unless you state different primary templates in the Layouts option.

    Comment


      #3
      Jscript

      Hello

      You may have a problem with the second line:

      <!-BEGIN

      Try that as:

      <!-- begin.

      Also try this script:

      <script type="text/javascript">
      <!--
      lastmod = document.lastModified // get string of last modified date
      lastmoddate = Date.parse(lastmod) // convert modified string to date
      if (lastmoddate == 0) { // unknown date (browser bug fix)
      document.writeln("Last Modified: Unknown")
      } else {
      document.writeln("Last Modified: " + lastmod)
      }
      // -->
      </script>

      This worked for me today when I had the same problem.

      Hope this helps.
      http://www.johnsons-seeds.com - Actinic plugins, remote add to cart and custom CMS
      http://www.dtbrownseeds.co.uk - More seeds and plants....
      http://www.mr-fothergills.co.uk - Well it used to be Actinic...

      Comment


        #4
        Thanks to both of you for replying.

        I'll try your suggestions.
        Original gifts for all occasions by British Artists and Designers

        http://www.giftedindesign.co.uk

        Comment


          #5
          Dave,

          I have tried your suggested script but I can't make it work.

          Which template did you put it in & where abouts? I have put it in Act_ProductBody & in Act_Primary (near the bottom) but it makes no difference..

          Thanks
          Jackie
          Original gifts for all occasions by British Artists and Designers

          http://www.giftedindesign.co.uk

          Comment


            #6
            Last Modified

            Hello

            If you go to www.mr-fothergills.co.uk/source/faq.html you will see your FAQ page minus a few images.

            In the top right hand corner you'll see the date last modified. Apparnetly thie ability of the document.lastmodified javascript property to be displayed properly is somewhat dependent on the server sending the correct header. I'm no server expert so if someone wants to correct me please do.

            I have placed the script in comments so if you view source and type Ctrl F and search for "<!-- FOLLOWING IS USEd FOR PAGE LAST MODIFIED SCRIPT -->" you'll see where the script is in the page.

            In your Act_primary.html template you would need to put it just under the NETQUOTVAR:LOGO tag inside a <TD> tag. I don't have an original Act_primary.html to hand but if you wanted to contact me through the website above I'll help you further.

            Hope this helps.

            Dave.
            http://www.johnsons-seeds.com - Actinic plugins, remote add to cart and custom CMS
            http://www.dtbrownseeds.co.uk - More seeds and plants....
            http://www.mr-fothergills.co.uk - Well it used to be Actinic...

            Comment


              #7
              Wow - You're really good!

              Thks - I'll work on that.

              Jackie
              Original gifts for all occasions by British Artists and Designers

              http://www.giftedindesign.co.uk

              Comment

              Working...
              X