We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40349
    • 26 Posts
    I was wonder if anyone had tried to add a snippet or a chunk to the content tag.

    Example : [[*content [[test]]]]

    What I am trying to do is create some TV with a image and a button below the image, but I want it to float right of the text in the content tag. My idea behind this is to create two TV's and out put the image and button in a <div> and float it right. This will make it very easy for the client that only has to find the image and add a www. to the button.

    However when I try doing this I can't get my content to show, but my snippet will. Any suggestions?
      Wild Eagle Design

      www.wildeagledesign.com
      • 19872
      • 1,078 Posts
      Not sure I follow and I only know enough to be dangerous. Content is reserved solely for content. All TVs should be named something different. Your example makes me think you've created a TV and named it "content".

      If I understand you correctly, you have 2 TVs. One for an image. One contains a snippet with button code... because I don't think TVs can contain actual html or php code.

      Do you have the call for both TVs on your template page? Perhaps you only have the call to the snippet on your template which is why it shows up by the image doesn't.

      Could also be a code / CSS issue with your floating. Have you viewed source in the browser to see what is actually being generated?
        • 40349
        • 26 Posts
        opps I thought I pasted the right one. This is what it looks like.
        [[*content [[test]] ]]


        I am new at this as well and know enough to be dangerous. I did some more trial and error and found this works and does what I want.

        <div class="content-web-design-right">
        [[*website_design_image_large]]
        </div>
        [[*content]]
        
          Wild Eagle Design

          www.wildeagledesign.com
          • 40349
          • 26 Posts
          The only thing I having a problem with now is when I do the Text Rich it puts a p tag around my image. Any solutions to get of it? The reason I'm using the Text Rich is a link is around the image.
            Wild Eagle Design

            www.wildeagledesign.com
            • 40349
            • 26 Posts
            mmcgee you are right that you can't put html in a TV. My idea was to put the TV in a chunk or a snippet. I still would be interested if that wold work and how it would look? However; from what I was trying to do can be done with out any chunk or snippet. So I guess that would just make extra work.

            Still trying to figure out how to make my image not have the p tag around it?

            here is the page I'm working on http://www.wildeagledesign.com/aetos-web-design.html
              Wild Eagle Design

              www.wildeagledesign.com
              • 3749
              • 24,544 Posts
              One way would be to put the TV tag in the Resource Content field of each document.

              You could also give the img tag an id and use CSS to position it.

              FYI, you can definitely put HTML in a TV's value.

              Personally, I would just turn off the RichText editor and have the content without the surrounding <p> tags.



              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              MODX info for everyone: http://bobsguides.com/modx.html
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting