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

    I am sorry for posting what is probably very basic to everyone else, but I am new to MODx and am only moderately familiar with HTML/CSS/PHP. I act as a backup for web development issues where I work and am rarely called on to help, but I am now trying to branch out on my own.

    I have installed MODx 0.9.5 and the SimplicityX template and everything is working (yeah, I surprise myself sometimes! grin). The source of the problem is really that I am not yet familiar enough with the CMS and I’ve not been able to find what I need to know online.

    The issue in question is that the simplicityX template has a chunk called ’simpnews’ and within this code is a comment that states "replace with Ditto snippet". Well, I don’t even know where to begin on this. I tried some code I found in the documentation and no success.

    Can someone explain (or just provide the code for) what I need to do here? I felt like I was doing pretty good until I hit this little snag!

    Any help is greatly appreciated!

    Dave
      • 29400
      • 15 Posts
      Hi,

      Quote from: DaveH at Feb 27, 2007, 04:20 PM

      ... "replace with Ditto snippet". ... Can someone explain (or just provide the code for) what I need to do here?
      Put the following snippet call in the SimplicityX template:
      [[Ditto? &startID=`2` &summarize=`2` &tpl=`nl_sidebar` &showarch=`0` &trunc=`0`]]

      I assume you’ve installed the example pages/content with the MODx installation, therefore your startID will be 2 (the ID of the Blog-Page/Container). In ressources/chunks should be a template named [tt]nl_sidebar[/tt] which will format your output. This call will show only 2 entries (summarize=`2`).

      OK?

      TDRWH
        • 6666
        • 3 Posts
        Hi, thanks for the reply. This has helped some but it’s not quite there yet. I think I am struggling with the concept of how this is supposed to work more than the code of it.

        For example, there is the chunk called "simpnews" and it calleds the ditto snippet and directs it to another chunk (i.e. nl_sidebar)? Is that right?

        Also, I am pretty sure I installed everything when I installed MODx, but I don’t have a nl_sidebar item.

        Dave
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          That is probably specific to the SimplicityX template; you’ll need to create it. There should be a "readme" or "install" file along with the rest of the template that details what is needed.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 6666
            • 3 Posts
            Are you referring to the nl_sidebar that I mentioned not having? If so, I was responding to TDRWH’s post where he indicated I should have that.

            The simplicityx instructions mention nothing about the nl_sidebar item so I am not sure if I even need to use that.

            Here are the instructions for installing the template:

            A MODx port of the Intense Simplicity template from http://www.openwebdesign.org/viewdesign.phtml?id=3076

            Upload the inner SimplicityX folder to your assets/templates folder.

            Create a new template and copy/paste the text from the SimplicityX.template.html file.

            Create new chunks and copy/paste the content of the chunk.html files.

            Add more chunks to the right sidebar as desired, using the same <div> containers as the simpNews chunk.

            Replace the unordered list in the simpTopMenu chunk with a menu builder snippet if desired. Adjust the CSS as needed.

            Edit the simpFooter chunk to suit your needs.

            And here is the text of the simpnews chuck:

            <div class="sideitem">
            <h4>News</h4>
            <!-- replace with Ditto snippet -->
            <p><b>5/09/06</b> - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas iaculis urna hendrerit. <a href=#">read more></a></p>
            <p><b>5/05/06</b> - Nam blandit. Nunc dolor. Vestibulum auctor. Mauris congue. <a href="#">read more></a></p>
            </div>


            Notice the comment to replace with Ditto snippet. This is where I am lost.

              • 29400
              • 15 Posts
              Quote from: DaveH at Feb 28, 2007, 02:16 PM

              Are you referring to the nl_sidebar that I mentioned not having? If so, I was responding to TDRWH’s post where he indicated I should have that.

              After installing the default demo content I found a chunk nl_sidebar - Default Template TPL for Ditto under News, Blogs and Catalogs category.

              The simplicityx instructions mention nothing about the nl_sidebar item so I am not sure if I even need to use that.


              The nl_sidbar chunk formats the Ditto output. It’s really straightforward. Here’s the code:

              <strong><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></strong><br />
              [+longtitle+]<br /><br />


              Are you sure it’s not in your standard installation?

              And here is the text of the simpnews chuck:
              <div class="sideitem">
              <h4>News</h4>
              <!-- replace with Ditto snippet -->
              <p><b>5/09/06</b> - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas iaculis urna hendrerit. <a href=#">read more></a></p>
              <p><b>5/05/06</b> - Nam blandit. Nunc dolor. Vestibulum auctor. Mauris congue. <a href="#">read more></a></p>
              </div>

              Notice the comment to replace with Ditto snippet. This is where I am lost.

              Remove the two paragraphs and put in the Ditto call from the demo content (the one I’ve posted above). It worked for me and I was able to look a bit deeper into things.

              Take a look at the MODxCSS or MODxHost templates. You may take the snippet calls inside those and put them in your (new) template to get it working.

              Bye,

              TDRWH