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

    I have the problem with custom templates. If I use custom template with nested div all content inside the first div removed.
    Don't know why and how to fix it.

    Thanks for help.

    Bye
    Chris [ed. note: chrissi last edited this post 10 years, 10 months ago.]
      • 43198
      • 20 Posts
      no one an idea?
      • Not enough information. Show us the template's code. What kind of content is being removed? Does it work if the page isn't using the rich text editor?
          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
          • 43198
          • 20 Posts
          oh, sure.

          here is a sample template I would like to use

          <div class="picture_left"><div class="pic_300"><div class="pic_inner"></div></div></div>


          this code is beeing deleted:

          <div class="pic_300"><div class="pic_inner"></div></div>


          this is the content inside the first DIV container.

          Thanks

          • TinyMCE will "helpfully" remove empty containers like that. Either set the resource to not use the rich text editor, or put those divs in a chunk.
              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
              • 43198
              • 20 Posts
              Thank you for reply.

              I found a easy solution. Only place a piece text inside the inner div:

              <div class="pic_300"><div class="pic_inner">content</div></div>


              Then, only the text content is beeing replaced by selected content. And if nothing selected the piece of code placed in without replacements. So we can override "content".

              That's it.