We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18809
    • 109 Posts
    Hello all,
    My site is in wordpress and I want to move it to Modx and its a blog site so I want a blog on Modx. I tried this many times but failed because of the layout I want.
    I used Articles for blog but failed in creating masonry or magazine style blog because Articles show only articlerowtpl posts. So I cant make it grid wise so it post articles like masonry. Like 1 and 2 then 1 and then 2. Currently Articles posts only 1 and then 1 and then 1.. simple blog layout. I want masonry layout. I have themes but I failed on this step.

    Please tell me is this possible with Articles ? Or any other Extra?
      My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
    • We've built MODX.today with the Collections extra - it's a little less opinionated about what your blog can contain, so we found that more flexible. It is somewhat more work as you'll need to set up features like archives yourself, but it does give you more control that way.

      getResources for listing your documents (which works with both Articles and Collections) has pretty advanced template options: http://rtfm.modx.com/extras/revo/getresources#getResources-TemplatingProperties You will probably want to look at the &tpl_n2 or &tplOdd properties for what you're describing.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 18809
        • 109 Posts
        Hello Mark, I want to get rid from Wordpress and its plugins which slows my site. I am a huge fan of MODX and want to learn it more and more.
        I got this &tpl_n2 or &tplOdd thing from BobRay also but I cant get it working with Articles.
        Here is what I have in my articlerowTpl -

        <li class="one_half first">
                  <article class="clear">
                    <figure class="post-image"><img src="[[++assets_url]]template/prototype6/images/demo/1200x400d.jpg" alt=""></figure>
                    <header>
                      <h2 class="blog-post-title"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
                      <div class="blog-post-meta">
                        <ul>
                          <li class="blog-post-date">
                            <time><strong>Completed:</strong> [[*createdon:strtotime:date=`%d/%m/%y`]]</time>
                          </li>
                          <li class="blog-post-cats">[[+tv.articlestags:notempty=`<span class="tags">[[%articles.tags]]: [[!tolinks? &items=`[[+tv.articlestags]]` &target=`[[*id]]` &useTagsFurl=`1`]]</span>`]]</li>
                        </ul>
                      </div>
                    </header>
                    <p>[[+content:ellipsis=`200`]]</p>
                    <footer class="read-more"><a href="[[~[[+id]]]]">Read More »</a></footer>
                  </article>
                </li>
                


        You can see here
        <li class="one_half first">

        I want my next post's
        <li class="one_half">
        automatically.
        How do I get this with getresources in Articles ? Please teach me in simple way. If it works then I will save my little life.
        And I saw modx.today and that;s what I want, A grid based layout. I see you used post formats like thing of wordpress in Modx. This is just WOW.
        Thank you.
          My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
          • 4172
          • 5,888 Posts
          IMO, and like Mark allready said, you are much more flexible, using collections instaed of articles.
          It is a bit more work to put everything together, though.
          But then, you would just put the getResources (or pdoResources) - snippet-call with tpl_nN - properties in your template and you should be done.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 18809
            • 109 Posts
            Quote from: Bruno17 at Jun 03, 2015, 01:01 PM
            IMO, and like Mark allready said, you are much more flexible, using collections instaed of articles.
            It is a bit more work to put everything together, though.
            But then, you would just put the getResources (or pdoResources) - snippet-call with tpl_nN - properties in your template and you should be done.

            But I don't even found a simple tutorial to use Collections. I don't know about its template tags.. how to deal with it in templates. Not even here : http://rtfm.modx.com/extras/revo/collections
            I installed collections and created a new Collection Blog(already there) but I dont know how about its tags and tpl's etc. There is no tutorial for it.
            Please link me or tell me how to make my template working with collections ?
              My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
              • 4172
              • 5,888 Posts
              Just create a template for your Collections-Container and your Blog-Resources as you would do with any other Resources-Container or Resource.
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 18809
                • 109 Posts
                Quote from: Bruno17 at Jun 03, 2015, 02:17 PM
                Just create a template for your Collections-Container and your Blog-Resources as you would do with any other Resources-Container or Resource.
                So that means [[*content]] call will show Collections ?
                And what if I want latest post widget on my sidebar?
                Thanks sir.
                  My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
                  • 4172
                  • 5,888 Posts
                  To list the children you would put getResources (or pdoResources) into the collections-container-template

                  [[getResources?
                  &parents=`[[*id]]`
                  &tpl=`yourTpl`
                  &tpl_n2=`yourSecondTpl`
                  ...and all other properties
                  ]]


                  to get the latest posts into the sidebar, you would put another getResources-snippet-call into the template.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 18809
                    • 109 Posts
                    I just called
                    [[getResources? &parents=`[[*id]]` &limit=`6` &tpl=`Proto1ArticleRowTpl` ]]

                    in my collections container template, but no results. Only blank. Nothing in source code.
                    Not with including tpl_N2 or tplOdd. And not with only &tpl alone. Where iam doing mistake ?
                      My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
                      • 4172
                      • 5,888 Posts
                      you did allready add some children to the collection and they are published?
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!