We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31902
    • 342 Posts
    Quote from: rthrash at Dec 17, 2010, 02:51 PM

    waizen,

    Start by explaining how the stuff in the right and left column will be generated in the first place? Is it unique per page? Is it unique per section, or some combination thereof?

    For this exercise, I think it would be unique to each page. Each page on the site would show three columns but different content each page. I assume that is what you mean?



    Quote from: rthrash at Dec 17, 2010, 02:51 PM

    As a starting point, and assuming you’re using Revo, make two addition TVs of the Textarea type. Give them a default content of @INHERIT:

    [[*leftColumn]]

    [[*rightColumn]]

    Now in the static part on your template, swap out the static bits for each of those TV calls. TVs are nothing more than additional custom content fields. Please feel free to ask further clarification.

    I’m understanding this as follows:

    1. I created two Tvs, each one by right-clicking the ’Template Variables’ section of the Elements tab (sorry for the play by play, but I really want to get this) and selecting ’New Template Variable.’
    2. In the resulting box, I gave the new variable a name, for instance ’leftColumn’, selected ’Textarea’ from the ’Input Type’ dropdown and added @INHERIT into the ’Default Value’ field. Same thing for the ’rightColumn’ TV.
    3. In the template, within the left column div, I added [[*leftColumn]] and in the right column div, I added [[*rightColumn]].

    I think I may need more clarification on the @INHERIT bit. Baby me if you have to.

    At this point, am I supposed to be seeing additional content fields within the ’Home’ resource? Theyre not there, although I assume I’m missunderstanding this part.


    Thanks, rthrash. I think I may be getting somewhere with your explanations (although not apparent yet).
      • 31902
      • 342 Posts
      Quote from: mconsidine at Dec 17, 2010, 03:27 PM

      FWIW, I have a left sidebar TV in a test Revo site, which was set up as is shown in the first of the two attached images....

      ...Hope this helps,
      Matt
      (also in VT)

      Thanks, Matt. Can you clarify your entries in the ’Input Option Values’ field?
      (P.S. - stay warm!)
        • 18913
        • 654 Posts
        Sure...
        When I select a resource to edit - which is using a template that calls this template variable - I see what is in the first image attached. So I can select that nothing be substituted in place of this variable when the page is rendered, or I can select a chunk which is nicknamed (here only) "origl".

        In fact what happens is if I select "origl" then the chunk "idw_sidebar" is inserted in place of the TV. The chunk looks in part like what you see in the second image.

        Matt
          • 22019
          • 390 Posts
          1. You will need to add the template variables to the template(s) you want them to appear on. Do this by selecting a template in the Element menu and editing it. Template variables show up as the third tab. Check the template variables you want that template to have (leftcolumn and rightcolumn).

          2. To add the text - ’what goes in them’ - these template variable fields now show up as extra content fields whenever you edit a resource with that template. They appear under ’Template Variables’ the third tab along.

          2. The @INHERIT binding, as it’s called, means that the default content (if you don’t edit any) for that template variable will be whatever is in the equivalent field in it’s parent resource. This is a good way of adding content that will apply across an entire section (folder) of your website - you add it once at the top level, and it ’inherits’ or cascades down to all its children.
            Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
            • 20288
            • 132 Posts
            Also, you can set the TV to "Rich Text" instead of Textarea, and if you have TinyMCE installed, the TV will be a rich text field instead of using just HTML.
              • 31902
              • 342 Posts
              You folks rock!

              I come in this fine Monday morning (of course, also having enjoyed more sleep this weekend) and find that you all have filled in many of the missing pieces. My left and right columns are...well...left and right columns!

              I like it here.

              P.S.
              Not to say I’m anywhere near an expert of any kind, but at least I have something to build on for now. In this case, I think I had a completely incorrect idea of what TVs are. I kept picturing them as something like snippets, or chunks... self-enclosed groups of code I had to come up with (hence, the whole ’what goes in there’ stupidity). Sorry about that.

              Again, thank you all.