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

    My link page is made of "list of small boxes". In each box there is topic, lick, picture and free text. With my old site I used XHTML + CSS to do this and when ever I want to add one more "box" I just copy-paste part of the XHTML-code and change the picture name, text, etc.

    Is there a better way to do it with MODx? Different template for link page? I don’t quite yet understand MODx and I really don’t know what to search for.

    Thanks,
    Tommy
      • 16183
      • 1,390 Posts
      Hi Tommy,

      Welcome to MODx!

      I’m not I understand what those boxes are. However, if you are looking for a way to summarise some information say on your home page, like news, and when clicked, those summaries open up in another page with the whole story, then you are looking for a MODx snippet called ditto. I would recommend that you first get to grips with the basics of MODx. Here are some helpful resources

      http://wiki.modxcms.com/index.php/Beginner%27s_Guide_to_MODx
      http://net.tutsplus.com/tutorials/other/working-with-a-content-management-framework-modx/
      http://wiki.modxcms.com/index.php/MODx_Instructional_Videos
      http://bobsguides.com/MODx.html
      http://codingpad.maryspad.com/category/modx/

      cheers/k
        • 30711
        • 70 Posts
        Thanks for your reply. My "boxes" are basicly what goes between <div></div> tags. For example, this would be the code Id be repeating:

        <div id="box">
        <a href="example.html">Example</a>

        <div class="picture left" style="width: 90px;">
        <img src="example.jpg" alt="Example" width="90" height="90" />
        <em>Example caption</em>
        </div>

        <p>This is the example text.</p>
        </div>

        And then there is the CSS-file which defines the dimensions, etc. for the "box"


        Tommy
          • 16183
          • 1,390 Posts
          OK,

          So I suppose you want a way to dynamically create those boxes. Ditto can easily do that. I don’t know how many link pages you have and whether those pages are internal or external to your site? What you can do is to create separate pages for each of those links. Then, you would use Ditto to aggregate them in your link page (the one displaying the links). So, Ditto will be pulling those individual pages into this one page. The Divs you talk about above can be dynamically generated by Ditto (as part of its templates - i.e. tpl chunks). This may not make much sense right now so like I said, probably best to get the basics first (sorry, don’t mean to sound patronising!)

          There is also a NewsListing snippet that you may want to look into.

          You can use your CSS files normally. Just reference it/them in the xhtml template you are using for your website. You basically need only one template; you do not need to create different ones for the different pages of your site, unless they are radically different, and even then, there are ways to go about that.

          Hope this helps

          cheers/k