We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5535
    • 8 Posts
    I am in the process of attempting to somewhat recreate http://cmscritic.com with MODx.
    Currently, the template has been converted but i’m struggling with a few minor items.

    I would like to be able to have a resized thumbnail beside my introtext but it’s not working as planned.

    Here’s what I have done so far:

    I’ve created an image tv and added it to my template.

    I have then, in my main template added the following code:
         <!-- Main content area -->
            <div id="homepagebottom">
               <div class="hpbottom">
    
                <h2 id="post-">[*longtitle*]</h2>
                <img class="thumb" src="[*image*]">[*content*]
               </div>
            </div>
    

    This works great and does indeed show the image which is what i wanted but it only shows the image on the full post and it’s not resized.

    Is there a way to get this image to resize to a certain size and show up in my introtext? I’ve tried adding it to the ditto template itself but that doesn’t appear to work.

    Can anyone provide simple instructions for a newbie?

    Thanks
      • 26931
      • 2,314 Posts
      Hi cmscritic,

      there’s a new plugin for exactly thyt purpose imageResizer: http://modxcms.com/extras/package/566

      or the phpThumb Package for MODx: http://modxcms.com/extras/package/341

      hope one of these will help smiley
        • 5535
        • 8 Posts
        I know how to add a resized image.. the issue is that I do not know how to make it show up next to my introtext..
          • 16183
          • 1,390 Posts
          Quote from: cmscritic at Aug 17, 2009, 11:49 AM

          I know how to add a resized image.. the issue is that I do not know how to make it show up next to my introtext..

          By introtext you mean MODx resource (i.e. document) introtext (summary field)? If so, you need to change/modify your code above by adding [*introtext*]. [*content*] is for the main content only. Whatever you add in the summary field/intro will be shown where you have [*introtext*].

          As for resizing, you said you have that covered (and Sharkbait’s pointed to some links). As for positioning of the image, that’s CSS stuff, am sure you know that wink. Hope this helps.

          As for ditto, to reference a TV, I believe you need to change the syntax like so [+myTV+]

          cheers/k

          EDIT: Ha, this was actually a ditto post smiley OK, use the syntax for ditto as shown below by Susan. I should have read this carefully. Btw, there is a dedicated ditto forum...
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            So your Ditto chunk tpl would look something like this
            <p>[+introtext+][+imagetv+]</p>

            Then in your .css file, float the image (or whatever it takes to position it as you want it).
              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