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

    Sorry in advance for the newbie questions, but I just can’t seem to figure this out. I want to have a blog with different categories. Let’s say I want posts to be filed under some combination of "Baby" "Garden" and "Website". I know like nothing about modx, so here’s what I did:

    1) I installed Ditto as per the installation.txt instructions.
    Didn’t seem to be any trouble here.

    2) I made a new Template Variable
    I logged into the manager and went to Resources->Manage Resources->Template Variables and made a new one called BlogCategory.
    Variable Name: BlogCategory
    Caption: [*BlogCategory*]
    Description: Category of the blog post
    Input Type: Checkbox
    Input Option Values: Baby||Garden||Website
    Default Value: Baby
    Widget: (nothing selected)
    Sort Order: 0
    Template Access: both Default Template and Minimal Template are checked, and they’re the only ones I have
    Access Permissions: All Document Groups

    3) I made a blog with some posts
    I created a new folder called News, ID 86.
    I created a document in that folder called Bloggy Uno. When I was editing this document in the manager, I saw the expected BlogCategory checkboxes, and I selected Baby and Garden.
    I created another document in that folder called Bloggy Number Two. I selected only the Baby checkbox.

    4) I made a page to list all of the blog posts.
    The full contents of the page is:
    Ditto says:
    
    [[Ditto? &startID=`86`]]
    


    It doesn’t look pretty at all (I suspect this is because I don’t know where to put the appropriate css .. help?), but it does list all both of the blog posts, so that’s good.

    5) I made a page that should list only the posts with the category Baby or Garden.
    The full contents of the page is:
    Ditto says:
    
    [[Ditto? &startID=`86` &tagData=`tvBlogCategory` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`Baby,Garden`]]
    


    When I look at this page, it says "No entries found"

    Can somebody please tell me what I’m doing wrong? I’m quite willing to provide whatever additional details you’d like!

    Thanks,

    -michael
      • 18397
      • 3,250 Posts
      To make what you are describing work, you need to set the display widget of the TV to a deliminted list with the delimiter being a comma. That should fix things.
        • 19220
        • 26 Posts
        Quote from: Mark at Jul 09, 2006, 02:50 PM

        To make what you are describing work, you need to set the display widget of the TV to a deliminted list with the delimiter being a comma. That should fix things.
        I went under Manager->Manage Resources->Template Variables and edited BlogCategory. I set Widget to "Delimited List". When I did this, Widget Properties showed up, and it listed Delimiter with a default value of a comma. That sounded good to me, so I saved it. I went back and looked at the blog documents, but they looked exactly the same (that is, there were still checkboxes with Baby or Baby and Garden selected). Looked good so far.

        Unfortunately, it still says "No entries found." when I go to the page with the Ditto call. Just in case, I tried refreshing the site and also using the [! ... !] version of the call, but no luck.

        Is this the standard way to use tags/categories? If not, I’d be quite happy to switch to something more standard.

        Thanks!

        -michael
          • 30960
          • 12 Posts
          Hi,
          I made a snippet CategoryTags(currently in japanese; but I hope English comments in source codes will help) for blog categorizing with Ditto.
          Sorry in advance, for my poor English or if there are already a better way to use categories.

          You can see a working sample here. http://nanabit.net/162&tags=MODx (in japanese).

          Features:

          • using Ditto’s tag filtering to display blog articles
          • you can post via NewsPublisher mod ver( NewsPublisherTagging) with multi categories. (using "check box" TV)
          • some Ditto modification is required( for showing categories in article (placeholder [+tags+] support) )
          • by clicking a category name, CategoryTags snippet shows a tag-filtered Ditto page automatically. (no need for individual page of each categories)

          Installation:(a bit complicated.)

          • add "check box" TV (Delimitted list by comma) name it "blogTags"(or anything). Optional values are like "category1||category2||category3" .
          • Install Ditto(above 0.9.2.1)
          • Modify NewsPublisher by appling the diff here: http://nanabit.net/modx/modx-newspublishertagging.html. (or by replaceing entirely with mod version in snippet.NewsPublisherTagging.1.4-1.0.zip
          • Modify FormBlog chunk, add [+tags+] placeholder which will be replaced by checkboxes of categories.
          • add &tvtags=`tvblogTags` (note the prefix "tv") into your [[NewsPublisher ..]] tag.
          • Modify Ditto by appling the diff here: http://nanabit.net/modx/modx-blog-categorize.html (or by replacing entirely with mod version insnippet.CategoryTags.1.0.0.zip )
          • Install CategoryTags snippet
          • insert [+tags+] placeholder in Ditto template, which will be replaced by list of categories
          • create a new document, add [[CategoryTags?categoryTagsTVName=`blogTags`&categoryTagsLandingID=`80`&mode=`list`]]
          • create a new template (if not yet) for blog articles, and add [[CategoryTags?categoryTagsTVName=`blogTags`&categoryTagsLandingID=`80`]] to it.(blogTags is the TV name used for categorizing, and 80 for your new document id made above.
          • add &categoryTagsTVName=`blogTags`, &categoryTagsLandingID=`80` into your [[Ditto ...]] tag.
          • complete.

          Thanks,
            • 16556
            • 27 Posts
            just wanted to say thanks uglydog, for the mod to the newspublisher snippet. works a so well. i have been trying to display and write to a checkbox tv for so long... thanks lach.
              • 19645
              • 23 Posts
                Quote from: uglydog at Jul 10, 2006, 08:40 AM

                H
                [list]
              • insert [+tags+] placeholder in Ditto template, which will be replaced by list of categories
              - What is exactly the Ditto template? I only use a template in Ditto for the blog
              • create a new document, add [[CategoryTags?categoryTagsTVName=`blogTags`&categoryTagsLandingID=`80`&mode=`list`]]
              - I created this document, but the categories I have aren’t displayed. I have a few posts that are tagged.
              • create a new template (if not yet) for blog articles, and add [[CategoryTags?categoryTagsTVName=`blogTags`&categoryTagsLandingID=`80`]] to it.(blogTags is the TV name used for categorizing, and 80 for your new document id made above.
              - I have added the this tag to the blog template, but there is nothing on display. In manager I can find the template variables when editing posts.
              • add &categoryTagsTVName=`blogTags`, &categoryTagsLandingID=`80` into your [[Ditto ...]] tag.
              • complete.


              Hi,

              I am new here. I am putting up a website with blog+RSS feeds, using Modx + Ditto. Works like a charm. I also installed CategoryTags and NewsPublishertagging. Now I can define categories and use the checkboxes to assign them. Until this part it works. The last part of Ugly Dog post is not completely clear. In the quote above, I have commented what happened to the various steps I had to follow. I hope someone can help, because I don’t have a clue, what exactly is going wrong.

              Really looking forward to have category tagging running on my website. smiley[/list]
                • 18397
                • 3,250 Posts
                Ditto 1.1 has support for a [+tags+] parameter including links generation. You may wish to try that instead.
                  • 19645
                  • 23 Posts
                  Thank you, for the fast reply. I will try that instead. smiley
                    • 19645
                    • 23 Posts
                    Hi, It works with Ditto 1.1! grin

                    I few things I noticed

                    I had my template variables delimitered with || and the following ditto tag:
                    [!Ditto? &startID=`2` &summarize=`10` &total=`20` &commentschunk=`FormBlogComments` &tpl=`nl_blog` &paginate=`1` &alwaysshow=`1` &tagData=`tvcategoryOptions` &tagDelimiter`||`  &tagMode=`onlyTags`!]


                    For a blog post that has two tags, this gives me the following output: tagA,tagB that links to blog.html?tags=tagA,tagB

                    If I modify &tagDelimiter`||` to &tagDelimiter` ` this remains the same. In order to seperate the tags for seperate links, I changed the delimiter settings for the template variable to space. This gives me: tagA linking to blog.html?tags=tagA and tagB linking to blog.html?tags=tagB. That’s what I need. For tags that consist of keyphrase I can use + instead of a space to keep the whole keyphrase as a tag.

                    So, I will stick to the following code:
                    [!Ditto? &startID=`2` &summarize=`10` &total=`20` &commentschunk=`FormBlogComments` &tpl=`nl_blog` &paginate=`1` &alwaysshow=`1` &tagData=`tvcategoryOptions` &tagDelimiter` ` !]


                    I have made some additions, but I thought it was better to post in the ditto 1.1beta2 topic:
                    http://modxcms.com/forums/index.php/topic,8988.15.html
                      • 24530
                      • 100 Posts
                      As I use @SELECT-bindings in my tags-TV I had to hack NewsPublisherTagging ...
                      http://modxcms.com/forums/index.php/topic,12053.0.html in this article you can find a (very simple but working) solution ...
                        my newest webpage [url=http://gitarren.zucali.at]Meisterwerkstatt f