We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3830
    • 22 Posts
    Hey all,
    I’ve been trying for about a week to either find some program that would work well here, or trying to get ditto configured, but I haven’t had any luck with either.
    http://reviewdistrict.net/modx that’s the website we’re trying to get it on, cause what we want is something that will allow us to post news to the home page, as general, and then have a tech, movies, and sports page, with different sections that act as categories, but we’re having a lot of trouble with it.

    Anyone got any advice?
      • 16278
      • 928 Posts
      How do you want to input your news items? If it’s from the front end, you might like to take a look at PubKitBlog (pkBlog), currently available from the In Development forum or from the Pogwatch site, where you’ll also find reference info and examples for using Ditto.

      pkBlog can be used to create and manage news items from the front-end, with tags and a custom date field. Using a radio-button TV for the tags, it shouldn’t be difficult to generate your news pages and sub-pages with Ditto.

      laugh KP
        • 3830
        • 22 Posts
        pkBlog would allow me to add news to the pages in the front end, then?
        Would it allow for multiple users, or just 1 account, used by all? Cause we have a few people, lie one would post for Tech stuff, and the other for Sports, and another for Moves, etc. etc.
        And thanks for the links, reading them over now!
          • 16278
          • 928 Posts
          Front-end item creation and management is the general idea, yes. So far the examples have been for a blog, with one listing page and links to full stories, but pkBlog is actually worked backwards from a site where its ancestor is used to make news stories in three categories. I’m in the process of setting up a demo site where you’ll be able to see categorized news entry in action, though I’ll not be able to do much on it for a few days now.

          Multiple users is no problem - you just create standard MODx web users and give access to the relevant pages through group memberships. My login scheme is very crude at the moment, but it works.

          Note that I uploaded an updated zip file (v1.2.1) to the development topic this afternoon - found an error in the main snippet code. See latest messages in there.
          smiley KP
            • 3830
            • 22 Posts
            Boy, am I lucky that you found this thread, haha.
            Thanks for the help man, I’m definitely gonna play around with it. Now, with Ditto, does the Documentation explain how to set that up so it will work fine too?
              • 16278
              • 928 Posts
              There’s a fairly comprehensive blog-oriented package in the zip file, including some text files that have to be copied into snippets and chunks and details of the snippet calls in the main documents. I’m concentrating on the input side, really, but I do aim to be making some realistic models of sites, for my own portofolio if nothing else!

              It’s probably a good idea for you to get the feel of Ditto with some simple examples first, as the set up for PubKit is moderately complex - nothing fiendish, but it helps to be familiar with the general landscape of Ditto calls, template chunks, placeholders and so on. There are various tutorials around other than Pogwatch, but most are rather long in the tooth, predating Ditto’s current version 2.1.

              laugh KP
                • 3830
                • 22 Posts
                So that .pdf and .rtf file that’s included in the zip file, is that telling me how to setup the page seen by the group I specified for web users, right? And for the page that I want to include the posts on would contain something like this line of code from your website:
                [!PubKitBlog? &folder=`2` &postid=`2` &template=`pwBlogPost` &tags=`pwTags` &rtcontent=`pkRichContent` &formtpl=`@FILE:blog` &delimiter=`,` &tagFormat=`chk` &cacheItem=`0` !]


                If I wanted to set it up for multiple pages and categories, do I just change the post id?
                  • 16278
                  • 928 Posts
                  The PubKitFolder snippet call goes on the page you are using for input of items in the relevant section. That page will be in a group accessible to the editor through group permissions.

                  The &folder parameter indicates where the item is stored when it is created (on publish or preview). For the Technology section of your site, that would be 6. You’d probably create a child of 6 to act as a separate container so you can keep the items separate from the Genera/Mobile/Computers pages, so you’d use that document ID.

                  &postid indicates what page to load after publication. It would either be 6 or one of the sub-pages using an array of tag=>page pairs such as &postid=`general 9,mobile 14,computer 15`. Your tags for the pages would be in a radio-button template variable, e.g. called techTags, with values for the options of Gen==general||Mob==mobile||Comp==computer. Your tag is referenced in the snippet call with &tags=`techTags`.

                  The published pages would be 9, 14 and 15, each containing a Ditto call to round up items relevant to the subsection, filtered by tags.
                  [!Ditto? &parents=14 &tpl=`tech.tpl` &tagData=`techTags` &tags=`mobile`!] 
                  You may want to have page 6 as an overview of all three, or may redirect to General if it is selected.

                  I’ve started setting up a structure like this for the news section of a demo site, hope things will be clearer when it is available.

                  smiley KP
                    • 3830
                    • 22 Posts
                    Thanks So much for all your help, KP!!

                    Just one question, for as many pages as I want there to be different news, for example, I have Technology and Sports, do I have to have a different document (news post) page per section (Because the way you described it in your post is exactly what I am doing, haha)? So like, news post would be id 28 and that would be tied to tech, but sports’ news psot page would be 29, right? Or, is it just one news post document page for the whole site?

                    [!PubKitBlog? &folder=`2` &postid=`2` &template=`pwBlogPost` &tags=`pwTags` &rtcontent=`pkRichContent` &formtpl=`@FILE:blog` &delimiter=`,` &tagFormat=`chk` &cacheItem=`0` !]


                    And as you explained for this code, when I put in General, Mobile, Computer as the tags, does pkBlog automatically create the radio button for the editor? Or is that something I will have to add
                      • 3830
                      • 22 Posts
                      Also, how do I add the multiple tags? Is that something I do within Ditto, or do I do that with pkBlog?
                      And for the Ditto code:
                      [!Ditto? &parents=6 &tpl=`tech.tpl` &tagData=`techTags` &tags=`mobile,general,computer`!]

                      Would that be what I put for the Main tech page, so it shows everything? And the only things that would change between container then, would be parents and tagdata/tags

                      Also, whats the tech.tpl? I see that there are .tpl files in the folder that I downlaoded, and they have to do with the tempalte, but do I rename the ones in there for each section?

                      Lol, I apologize, but I have soooo many questions still, I guess haha. Thanks for your patience with me, I am really eager to learn.