We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43359
    • 6 Posts
    Hi everyone, I just started using Modx. I added the TinyMce editor. I Setup my template as follows:

    [[$resume-header]]
    [[*content]]
    <div class="row">
    [[$block-1? &img=[[*block-1-image]] &title=[[*block-1-title]] &text=[[*block-1-text]]]]
    [[$block-2? &img=[[*block-2-image]] &title=[[*block-2-title]] &text=[[*block-2-text]]]]
    [[$block-3? &img=[[*block-3-image]] &title=[[*block-3-title]] &text=[[*block-3-text]]]]
    </div>
    [[$resume-footer]]
    


    Everything worked fine. In the Template Variable "block-2-text" (defined as richtext) I began to enter text into the editor from the resource page that i created. The text entered fine, and displayed in my browser. However, next I when I tried to enter an image or a external link into the TinyMce editor, all my text disappeared (when viewed in the browser). The image does appear in the text editor. I checked the source code in the browser and the paragraph is completely gone. I checked the TinyCME configuration and could not find anything related to links or images. Am I missing something... A setting in modx ? I am running Modx from localhost.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I presume that your main content area is Rich Text; can you insert images into that text OK?

      I've tried this, and cannot reproduce your problem. Images and links are inserted as expected.

      Personally, I wouldn't do those blocks that way at all. I would use MIGx; the demo in its documentation fits your situation exactly. http://rtfm.modx.com/display/ADDON/MIGX

        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It would help if we could see what your block-1 chunk looks like.
          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
          • 43359
          • 6 Posts
          Quote from: sottwell at Apr 14, 2013, 10:59 PM
          I presume that your main content area is Rich Text; can you insert images into that text OK?

          I've tried this, and cannot reproduce your problem. Images and links are inserted as expected.

          Personally, I wouldn't do those blocks that way at all. I would use MIGx; the demo in its documentation fits your situation exactly. http://rtfm.modx.com/display/ADDON/MIGX


          When I enter an image into the main content area from the editor, it does appear in the browser.
            • 43359
            • 6 Posts
            Quote from: sottwell at Apr 14, 2013, 11:05 PM
            It would help if we could see what your block-1 chunk looks like.

            <div class="large-4 columns">
                  <img src="[[+img]]" alt="responsive"/>
                  <h4>[[+title]]</h4>
                  [[+text]]
            </div>
            


            I am adding the CMS to my Foundation 4 design.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I'm not exactly sure what you are trying to accomplish with your chunks and TVs. Do you want a content block that consists of a title, an image, and a caption/description for the image? Or is the block-1-text going to contain additional images?

              The purpose of the properties in the chunks is so that you can have different material in the same chunk. Instead of chunk-1, chunk-2, etc. you would only need one chunk. The placeholders in the chunk would accept the values of the properties you specify in the chunk tags.

              <h2>[[+title]]</h2>
              <img src="[[+img]]" alt="responsive">
              <p>[[+text]]</p>

              And your template would now look like
              <div class="row">
              [[$block? &img=[[*block-1-image]] &title=[[*block-1-title]] &text=[[*block-1-text]]]]
              [[$block? &img=[[*block-2-image]] &title=[[*block-2-title]] &text=[[*block-2-text]]]]
              [[$block? &img=[[*block-3-image]] &title=[[*block-3-title]] &text=[[*block-3-text]]]]
              </div>
              
                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
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I still strongly recommend MIGx for this kind of thing. Take a look at my site; the blocks are done with MIGx. http://sottwell.com
                  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
                  • 43359
                  • 6 Posts
                  Quote from: sottwell at Apr 14, 2013, 11:19 PM
                  I still strongly recommend MIGx for this kind of thing. Take a look at my site; the blocks are done with MIGx. http://sottwell.com

                  I just started with modx. I was trying to template the following:

                  http://www.jts.name

                  Thanks for the quick responses.
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    The thing is, you need three different chunks and nine different TVs, or one chunk and nine TVs using properties.

                    With MIGx, you need three TVs and a snippet, but the TVs are all edited in the one MIGx TV in your resource, so in effect you're only editing one TV. Each row of the MIGx TV has three fields, title, img, text. The "helper" image TV and Rich Text TV are used as fields in the MIGx TV - you don't need to specify a "helper" TV for the one-liner title, that comes with MIGx by default. With MIGx, you can create as many of these rows as you need, all in the same single TV. You can even set up the TV to have checkboxes so you can select which blocks you want. I use them for sidebar blocks, for JQuery carousels, or anything else where I want consistently formatted blocks of content.




                      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
                      • 43359
                      • 6 Posts
                      Quote from: sottwell at Apr 15, 2013, 12:29 AM
                      The thing is, you need three different chunks and nine different TVs, or one chunk and nine TVs using properties.

                      With MIGx, you need three TVs and a snippet, but the TVs are all edited in the one MIGx TV in your resource, so in effect you're only editing one TV. Each row of the MIGx TV has three fields, title, img, text. The "helper" image TV and Rich Text TV are used as fields in the MIGx TV - you don't need to specify a "helper" TV for the one-liner title, that comes with MIGx by default. With MIGx, you can create as many of these rows as you need, all in the same single TV. You can even set up the TV to have checkboxes so you can select which blocks you want. I use them for sidebar blocks, for JQuery carousels, or anything else where I want consistently formatted blocks of content.


                      Okay thanks for information. I will give it a try. I am just getting my head around modx. I like the flexibility.