We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46950
    • 86 Posts
    Here is the part of the template where I'd like to change them:
    <div class="content left">
      <div class="post">
        Дата публикацiи: [[*publishedon]]"
        <h2 class="postTitle">[[*pagetitle]]</h2>
        <img class="mainImage" alt="" src="[[*image:phpthumbof=`w=120&h=120&zc=1`]]" style='float:left;margin:7px 7px 0 0;'>
        [[*content]]
      </div>
    </div>
    


    And on the attached picture you can see how it looks for my broswer (Firefox). Can anybody explain it?

    This question has been answered by zwhzwh. See the first response.

      • 9995
      • 1,613 Posts
      Are you sure you have the right chunk/template?
      In the source it says </img> while in the chunk/template there isn't.

      That call doesn't look wrong.
      Maybe you need [[+image:phpthumbof... if you use getresources?

        Evolution user, I like the back-end speed and simplicity smiley
        • 46950
        • 86 Posts
        Quote from: fourroses666 at Nov 10, 2014, 08:01 AM
        Are you sure you have the right chunk/template?
        In the source it says while in the chunk/template there isn't.

        That call doesn't look wrong.
        Maybe you need [[+image:phpthumbof... if you use getresources?

        Yes, I'm sure because I've changed a number in the picture's style and now it's different in the page's HTML, too.
        <div class="content left">
          <div class="post">
            Дата публикацiи: [[*publishedon]]"
            <h2 class="postTitle">[[*pagetitle]]</h2>
            <img class="mainImage" alt="" src="[[*image:phpthumbof=`w=120&h=120&zc=1`]]" style='float:left;margin:7px 6px 0 0;'>
            [[*content]]
          </div>
        </div>
        

        As for
        </img>
        , my Firefox must add it itself -- maybe for its own satisfaction.

        As for "+image", I've tried both "+image..." and "+tv.image..." and in the both cases my browser showed me no picture and the src for than img was empty, so "*image..." must be the correct variant.
        • discuss.answer
          • 46950
          • 86 Posts
          The problem is solved! I must have put down the size of the picture in HTML, too:

          <p class="summary"><img src="[[+tv.image:phpthumbof=`w=100`]]" style='float:left;margin:7px 7px 0 0;' width=100>  [[+introtext]]</p> 
          
            • 14214
            • 299 Posts
            <p class="summary"><img src="[[+tv.image:phpthumbof=`w=100`]]" style=[b]"[/b]float:left;margin:7px 7px 0 0;[b]"[/b] width=[b]"[/b]100[b]"[/b]>  [[+introtext]]</p> 


            Some correction to your tpl. However, you may want to look at making the layout adjustment and style changes in your CSS rather than you template. This way you can assign a class="img-intro" and keep layout to the CSS file rather than in-line. Just a suggestion.
              • 46950
              • 86 Posts
              Quote from: jisaac at Nov 11, 2014, 03:05 PM
              <p class="summary"><img src="[[+tv.image:phpthumbof=`w=100`]]" style="[b]"[/b]float:left;margin:7px" 7px="" 0="" 0;[b]"[="" b]="" width="[b]"[/b]100[b]"[/b]">  [[+introtext]]</p> 


              Some correction to your tpl. However, you may want to look at making the layout adjustment and style changes in your CSS rather than you template. This way you can assign a class="img-intro" and keep layout to the CSS file rather than in-line. Just a suggestion.
              Hmmm... Surely, keeping all styles in a CSS file is some better but, frankly speaking, I didn't understand what these letters "b" in brackets mean. They look like the tags of the bold font type but in brackets, but I'm sure your idea was different... If I did it myself, I'd simply replace the option "style" with an option "class", with this class described in a CSS file.
                • 14214
                • 299 Posts
                Those were indeed bold tags form the forum, to show where there were errors. Previously there were some not closed and others used a ' rather than a "
                  • 42802
                  • 96 Posts
                  Sebastian Zahn | ingroove.uy Reply #8, 11 years, 10 months ago
                  Quote from: zwhzwh at Nov 11, 2014, 01:24 AM
                  The problem is solved! I must have put down the size of the picture in HTML, too:

                  <p class="summary"><img src="[[+tv.image:phpthumbof=`w=100`]]" style="float:left;margin:7px 7px 0 0;" width="100">  [[+introtext]]</p> 
                  

                  i don´t think this solve the problem, maybe now you see the image 100px width because you are forcing this size, right click on the image ( in the browser ) and see the source image, there you will see the real size.

                  You should specify all visual styles in css, that´s what css is for.

                  If you´re using getresources you must use the "+" sign, so instead of "[[*pagetitle]]" you should use "[[+pagetitle]]", if it´s a template variable, you must put the "tv" prefix, so [[+tv.image]], and enable tvs and process tvs in the getResources call.

                  It´s all here: http://rtfm.modx.com/extras/revo/getresources

                  Hope this helps.
                  Sebastián.



                    • 46950
                    • 86 Posts
                    Quote from: zzseba at Nov 14, 2014, 09:06 AM


                    i don´t think this solve the problem, maybe now you see the image 100px width because you are forcing this size, right click on the image ( in the browser ) and see the source image, there you will see the real size.

                    You should specify all visual styles in css, that´s what css is for.

                    If you´re using getresources you must use the "+" sign, so instead of "[[*pagetitle]]" you should use "[[+pagetitle]]", if it´s a template variable, you must put the "tv" prefix, so [[+tv.image]], and enable tvs and process tvs in the getResources call.

                    It´s all here: http://rtfm.modx.com/extras/revo/getresources

                    Hope this helps.
                    Sebastián.
                    well, I guess that putting all styles into a CSS file is better but in this case I wanted simply to solve the problem ASAP for a test site. I hope there's no difference in how it works between typing class='...' and discribing it in a CSS file and typing directly style='...'?