We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27509
    • 22 Posts
    I really love the Wordpress blog style. I’ve already found the permalink snippet and it works great for document titles. It would be nice if i could add this to the [+title+] of the summarized articles as well. Is this possible in any way?

    • You sure can. It would mean just wrapping the Headline in an A tag in the code I think.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 27509
        • 22 Posts
        My knowledge of php is very, very basic. I tried to find the headline in the code, but i do not understand how it’s generated.
        I thought this was the part, but i didn’t succeed in altering the code.

        $summary = $resource[$x]['introtext'];
          • 18397
          • 3,250 Posts
          Here you are:

          Directions:

          1. Get the newest version of NewsListing from http://modxcms.com/forums/index.php/topic,1235.0.html.

          2. Create new chunk called NewsListingTemplate

          3. Insert the following:
              <div class="summaryPost">
                  <h3><a href="[~[+id+]~]">[+title+]</a></h3>
                  <div>[+summary+]</div>
                  <p>    [+link+]</p>
                  <div style="text-align:right;">by <strong>[+author+]</strong> on [+date+]</div>
              </div>
          


          4. Then add &tpl=`NewsListingTemplate` to the snippet call
            • 27509
            • 22 Posts
            Thank you! I actually understand what happens laugh I tried this myself but I couldn’t figure out what to link, I thought a specific id was needed. You just made me very happy!
            • Actually the A should go inside the H3... but otherwise very cool!
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 18397
                • 3,250 Posts
                Laughs, forgot to validate! Code updated.