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

    Picked up modx yest thought might as well learn it, followed a really nice tutorial, think its actually by someone from these forums, my problems this:

    The tutorial explains if you write your description or what have you in the page your editing’s resource content, you can then delete the code from the the template and reference it using the [*content*] tag. Now I’ve done everything dead on exactly how they did it, but when I replace my content <div> with the other tag instead of appearing on the webpage nicely it appears like so, screenshotted it:


    By dntel123 at 2010-02-16

    So its squished it weirdly for no reason, but if i write it in code with the <div> etc it works perfectly, wondered if maybe im getting a bug? using version 1.02

    Thanks for any help!
      • 18913
      • 654 Posts
      Take a look at the the "mode" the resource editor is in. Below the text editting box, on the left, will be an option for which editor to use. If it is set to TinyMCE, then you are in "rich-text" mode. And if you are copying-and-pasting the text+html from the example into that box in that mode, then additional HTML will get added as well that you don’t see.

      Before pasting the text into the content editor, change the editor to "none" (or whatever the non-rich-text mode is). You may also need to change the "rich-text" option in the Settings tab. In any case, when you save the document make sure it’s not in rich-text mode if in fact you have entered html into the editor.

      I suspect you are using the tutorial on maryspad and if so I’m certain she can set me straight if I am mistaken.

      MattC
        • 8609
        • 607 Posts
        I agree with MattC. I’m not entirely sure what you mean when you say "if i write it in the code with the <div> it works perfectly". Be careful that you didn’t accidentally get rid of a closing div somewhere while working with the template.

        The [*content*] tag renders whatever information the user types in the main content box when creating a resource. The only thing you should be deleting from the template and replacing with the [*content*] tag is the text on the page. Because this leaves room for your own text. If you want to paste html and stuff in there you do need to turn the richtext editor off as MattC said.

        Hope this helps.

        Quote from: mconsidine at Feb 17, 2010, 11:21 AM

        Take a look at the the "mode" the resource editor is in. Below the text editting box, on the left, will be an option for which editor to use. If it is set to TinyMCE, then you are in "rich-text" mode. And if you are copying-and-pasting the text+html from the example into that box in that mode, then additional HTML will get added as well that you don’t see.

        Before pasting the text into the content editor, change the editor to "none" (or whatever the non-rich-text mode is). You may also need to change the "rich-text" option in the Settings tab. In any case, when you save the document make sure it’s not in rich-text mode if in fact you have entered html into the editor.

        I suspect you are using the tutorial on maryspad and if so I’m certain she can set me straight if I am mistaken.

        MattC
          • 7699
          • 16 Posts
          Right sorry if I’m not that clear smiley

          <div id="content"> 
          [*content*] 
          </div>


          Thats how I have it written in the template, which as you say should take the text from the main area on the home page and place it in the correct place.

          When I say it works with the <div> I mean if I Paste this, its fine:

          <div id="content">
          <h1>What is Massage?</h1>
          <p>Massage therapy improves circulation by bringing oxygen and other nutrients to body tissues. </p>
          <p>It relieves muscle tension and pain, increases flexibility and
          mobility, and helps clear lactic acid and other waste, which reduces
          pain and stiffness in muscles and joints.</p>
          <h3>Why Do People Get Massage Therapy?</h3>
          People get massage therapy for relaxation or for a variety of health conditions:
          <ul>
          <li>Back pain </li>
          <li>Inflammatory conditions such as arthritis and tendinitis </li>
          <li>Stress relief and stress-related conditions </li>
          <li>Headaches and migraines </li>
          <li>Muscle and related conditions such as spasms, strains and sprains </li>
          <li>Repetitive strain injury, such as carpal tunnel syndrome </li>
          <li>Circulatory and respiratory problems </li>
          <li>Post-injury and post surgical rehabilitation </li>
          </ul>
          <p>Massage therapy relieves stress. It is thought to help the body's
          stress response by lowering levels of hormones such as cortisol.</p>
          <p>Massage therapy also appears to enhance immune function.</p>
          </div>
          
          <div style="clear:both"> </div>


          There is no formatting error. It’s only if I try referencing that text with the content tag that the formatting goes mental huh

          Tried changing everything, not really sure what it could be:

          And just for reference this is the template code:

          {{swansong_header}}
          
          {{swansong_leftsidebar}}
          
          {{swansong_rightsidebar}}
          
          
          <div id="content">
          <h1>What is Massage?</h1>
          <p>Massage therapy improves circulation by bringing oxygen and other nutrients to body tissues. </p>
          <p>It relieves muscle tension and pain, increases flexibility and
          mobility, and helps clear lactic acid and other waste, which reduces
          pain and stiffness in muscles and joints.</p>
          <h3>Why Do People Get Massage Therapy?</h3>
          People get massage therapy for relaxation or for a variety of health conditions:
          <ul>
          <li>Back pain </li>
          <li>Inflammatory conditions such as arthritis and tendinitis </li>
          <li>Stress relief and stress-related conditions </li>
          <li>Headaches and migraines </li>
          <li>Muscle and related conditions such as spasms, strains and sprains </li>
          <li>Repetitive strain injury, such as carpal tunnel syndrome </li>
          <li>Circulatory and respiratory problems </li>
          <li>Post-injury and post surgical rehabilitation </li>
          </ul>
          <p>Massage therapy relieves stress. It is thought to help the body's
          stress response by lowering levels of hormones such as cortisol.</p>
          <p>Massage therapy also appears to enhance immune function.</p>
          </div>
          
          <div style="clear:both"> </div>
          
          {{swansong_footer}}


          It might just be some random thing that only happens to me tbh smiley

          Thanks you!