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

    Just recently put up the latest version of modx and along with it came the demo blog that ditto is capable of.

    Ok the problem I have is that styling the blog (Text size etc) seems to be made up of goodness knows how many parts. At best im guessing 5 templates along with about 30 different bits of css (class’s and id’s), but im struggling finding these.

    So the layout always looks way off and unformatted.

    Is there a bit of documentation that dummies can follow? I mean a real idiots guide to styling the ditto blog.

    Thanks in advance.
      • 4749
      • 623 Posts
      Hi Goldeagle,
      I don’t know where your skills are at programming/design wise, but for me creating a whole new blog was much easier. In a (small) nutshell this is what you do:

      1. Create a container in the root of the document tree (where all your posts will go).
      2. Create the HTML for your blog. Here’s a simple example of a blog post template:
      <div class="post">
      	<h2><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></h2>
      	    [+summary+]
              <span class="continue">[+link+]</span>
      	<div class="post_info" >Posted by <strong>[+author+]</strong> |  [+pub_date:date=`%B %e, %Y`+] | Tags: [+tagLinks+]</div>
      
      </div>

      3. Style your template however you need.
      4. Create a sample post.
      5. Create the Ditto call so you can play around with it. Here’s a sample ditto call:
      [!Ditto? &parents=`1` &id=`blog` &display=`5` &tpl=`blogTpl` &paginate=`1` &extenders=`summary,dateFilter` &dateSource=`pub_date` &dateFormat=`%B %e, %Y` &orderBy=`pub_date DESC` &paginateAlwaysShowLinks=`1` &getDocuments=`1` &trunc=`1` &truncLen=`1000` &truncOffset=`15` &truncText=`...Continue Reading` !]
      
      <p>Showing <strong>[+blog_start+]</strong> - <strong>[+blog_stop+]</strong> of <strong>[+blog_total+]</strong> Articles</p>
      
      <div id="ditto_pages"> [+blog_previous+]  [+blog_pages+]  [+blog_next+] </div>

      6. Then test and test again. Tweak your styles and your template to get your blog looking just how you want it to.

      Now, for your styling issues. If you’re not a CSS guru then I’d suggest finding a blog style you like, mimick the CSS and adjust it until it’s just right. But, your design or style problems stem from having the template defined. Once you have your blog template defined (e.g.,<div class="whatever"> <span class="whatever2">) then you can start adding the styling and tweaking it. I don’t know of any styling guides, as this is not a styles forum. You may find more help on the matter in the web design board: http://modxcms.com/forums/index.php/board,204.0.html

      Good luck!
        The MODx has you...
        Utah Web Design
        • 11041
        • 82 Posts
        Hi cbaone,

        Many thanks for your reply.

        I will try this and see how far I get with it. Adjusting the div size etc to how I want it shouldnt be too much of the problem. The biggest problems I was having was the size of the text and ol / li.

        I added these to my css already but these then made no difference. Is it because I need to reference to them for example #blog.li or similar?
          • 4749
          • 623 Posts
          well, sure. You need to reference any styled elements to the css. So, if you want to style li/ol/ul then you’ll need to make it known in the css:
          #blog li {
              font-color: #990000;
              font-size: 12px;
          }
          

          Or whatever you decide to do. Good luck.
            The MODx has you...
            Utah Web Design