We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9572
    • 56 Posts
    I’m using a custom ditto template to create each blog entry so that when I create a new page, I just type in the content.

    What I’m trying to do is give each blog entry its own link but I can’t figure out how to accomplish that. You can see what happens here; http://www.fegul.com/modx/index.php?id=7

    Click on any of the entry titles and you’ll see that it goes to a page that just has the text, but not the proper formatting.

    How would I be able to format the entry properly and make it the only entry displayed?
      • 18397
      • 3,250 Posts
      You would need to create a separate MODx template for your blog items that have the same elements as your Ditto template.
        • 9572
        • 56 Posts
        Quote from: Mark at Dec 31, 2006, 06:51 PM

        You would need to create a separate MODx template for your blog items that have the same elements as your Ditto template.
        Oh boy, another question regarding formatting the date lol

        I now know how to format the date in a Ditto call, but when I create the new template, how do I convert the seconds into the %D format?

        I looked at the site and it said;
        This is not a "normal" date, and must be processed by a script for meaningful output. Example: strftime("%d/%m/%y %H:%M:%S", $value)

        How would I create the script (or is there one included in Modx already?) and send it the specific page’s createdon tag and then display the result in the template?

        I don’t know much about PHP yet, a little frustrating but I’m learning.

        Happy New Years!

        EDIT: I figured it out.  Through some searching I came accross this thread; http://modxcms.com/forums/index.php/topic,3262.0.html
        I then created the snippet for that and called it using
        [!FormatDate? &date=`createdon` &format=`%D`!]

        I took the syntax of the call from the minimal template that was included with Modx.  Slowly but surely I’m learning laugh

        Thanks again