We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19057
    • 2 Posts
    Hi

    I’ve recently installed MODx locally on XAMPP on a Mac. I’m following the tutorial for creating a tagged blog with Ditto from http://wiki.modxcms.com/index.php/Tagged_blogging_with_Ditto but have encountered a problem.

    I’ve created a template variable called ’tags’ as detailed and added the following Input Option Values:
    Personal||MODx||Web Design||Pirate

    I’ve created a chunk called ’dittoTpl’ and added the following code:
    <p><div class="ditto_summary">
    <div class="ditto_head">
    <h3><a href="[~[+id+]~]">[+date+] </a> : [+title+]</h3>
    <div class="commentCount"><a href="[~[+id+]~]#pageComments">[[Jot? &docid=`[+id+]` &action=`count-comments`]] comments. </a></div>
    [[tagLinks? &id=`[+id+]` &tv=`tags` &separator=`, ` &fap=`1` &path=`categories` &label=`Tags: ` &style=`dittoTags`]]
    </div>
    <div class="ditto_content">
    <p>[+summary+]&nbsp;[+link+]</p>
    </div>
    <div class="ditto_author"></div>
    </div></p>

    I’ve created a snippet called ’tagLinks’ and added:
    [[tagLinks? &tv=`tags` &separator=`,` &format=`a` &element=`span` &fap=`1` &path=`blog/categories`]]

    I’ve created a container page with the URL alias (I’m using friendly alias paths) of ’categories’ that has an ID of 8.

    I’ve created four pages within this container, the first with a URL alias of ’personal’ and added:
    [!Ditto? &startID=`8` &tpl=`dittoTpl` &tagData=`tvtags` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`Personal`!]

    the second with a URL alias of ’modx’ and added:
    [!Ditto? &startID=`8` &tpl=`dittoTpl` &tagData=`tvtags` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`MODx`!]

    the third with a URL alias of ’webdesign’ and added:
    [!Ditto? &startID=`8` &tpl=`dittoTpl` &tagData=`tvtags` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`Web Design`!]

    the fourth with a URL alias of ’pirate and added:
    [!Ditto? &startID=`8` &tpl=`dittoTpl` &tagData=`tvtags` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`Pirate`!]

    I’ve created a new page with the URL alias of ’blog’ and added:
    [!Ditto? &startID=`8` &tpl=`dittoTpl` &summarize=`5`!]

    When I view the page ’blog’ in a browser window I get the four categories (Personal, MODx, Web Design and Pirate), each with a date, but each with the following error underneath:
    Parse error: syntax error, unexpected ’[’ in /Applications/XAMPP/xamppfiles/htdocs/xampp/modx/manager/includes/document.parser.class.inc.php(770) : eval()’d code on line 1

    Does anyone have any suggestions for resolving this?

    Thanks
    Melanie