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

    I’m just starting out with MODx and I’ve created a simple site (so far) which has a bunch of documents, a menu and a template. I decided to add a right hand side bar following http://modxcms.com/forums/index.php/topic,901.msg5681.html#msg5681. Now, I didn’t go through and select which blocks I wanted on each document, I just left it as the defaults in the TV. This caused some extra text to be rendered, like this:



    Now, when I went to the document and selected the blocks I wanted, this text disappeared. Has anybody else had this problem?

    I’m using MODx 0.9.6rc1, PHP 5.2.1-r3, MySQL 5.0.26-r2, Apache 2.0.58-r2 on Gentoo.

    Thanks,
    Luke.
      • 17622
      • 39 Posts
      Wot? 25 views and no reply? >:( Do I need to post porn or something? grin

      Has anybody else had this problem?

      Thanks,
      Luke.

      P.S: Bump! tongue
        • 25663 MODX Staff
        • 12,272 Posts
        What are your input and output values for your sidebar TV (or however you have it structured)?
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 17622
          • 39 Posts
          Quote from: rthrash at Mar 22, 2007, 05:31 PM

          What are your input and output values for your sidebar TV (or however you have it structured)?

          It’s not really a matter of what I have in there, it’s just that creating the TV’s after the documents have been created, (haven’t tried creating a doc afterwards yet) caused the wrong output.

          This is what I have:

          Input Option Values: ||Search=={{Search}}||Login=={{WebLogin}}
          Default Value: Search=={{Search}}||Login=={{WebLogin}}

          The highlighted stuff in the above screenshot only disappears after I go through each doc and tell it what to use on the sidebar.

          Luke.
            • 10487 MODX Staff
            • 1,535 Posts
            The problem is your default value - it won’t work how you have it set up at the moment as it treats the default value as a plain string and just adds the chunk content where appropriate. What is it that you wanted to be displayed for the default value?
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 17622
              • 39 Posts
              Quote from: garryn at Mar 22, 2007, 06:57 PM

              The problem is your default value - it won’t work how you have it set up at the moment as it treats the default value as a plain string and just adds the chunk content where appropriate. What is it that you wanted to be displayed for the default value?

              I’m not really sure what you mean, but if you look at the tutorial link above, they do exactly the same thing.

              I’ve also tried having the blank "||" at the end as well (for an empty sidebar), same result.

              Thanks,
              Luke.
                • 8960
                • 150 Posts
                Quote from: Lucretia at Mar 22, 2007, 06:38 PM

                Input Option Values: ||Search=={{Search}}||Login=={{WebLogin}}
                Default Value: Search=={{Search}}||Login=={{WebLogin}}

                I think problem is with your Default value. I’m pretty sure it should be just the Snippet call like this {{Search}}. I’m also not sure that you need the leading || at the beginning of the Input Option Values.

                Let’s assume you’ve selected Input Option as something like Check Box or Multi Select. The TV value that you are selecting in each document comes from the Input Option Values. So, when you select Search or WebLogin (or both) within the TV in the document, it will show that on your website.

                The Default value comes into play when you want these Input Option Values to be displaye on the site by default. So if you put {{Search}} (not Search=={{Search}}) in the Default Value area, the Search will be shown on each page by deafult. So, if you’re wanting Search & WebLogin displayed on the website on each page, put this in your Default Value area: {{Search}}{{WebLogin}} or even {{Search}}
                {{WebLogin}}.

                Hope that helps. You might also consider running through this TV tutorial I posted here. My tutorial is very similar to the one you posted above, but it might be a little more detailed.
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Quote from: Lucretia at Mar 22, 2007, 06:38 PM

                  It’s not really a matter of what I have in there, it’s just that creating the TV’s after the documents have been created, (haven’t tried creating a doc afterwards yet) caused the wrong output.
                  But it actually is a matter of what you have in there. smiley

                  The other folks above offered good advice. Default values should only contain a single value, not a conditional or multiple-select options (coincidentally if you take a peek back at that tutorial you’ll find the same thing).

                  The input options allow you to select from multiple items. The default is the one (and ONLY one) used if nothing else is selected from the input options. A helpful use of the Default value is to plug in @INHERIT in that slot. That way you can set the value you want to use in a container document (a folder), and all children under that (assuming they use the same template) will automatically use those same values. FYI, I find that it’s typically easier to use the first value as follows when there’s multiple options involved to help prevent confusion:
                  null==||Real Option 1==Value 1||Option 2==Value 2...

                  (Substitute "inherited" or "default" as makes sense for the "null" in the code example above.)
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 8960
                    • 150 Posts
                    Awesome, Ryan, thanks... been looking for some of that information for a while now and in other posts I just replied to as well.

                    So with the Default Value, what happens if we ’cross the streams’ and put more than one value in there?

                    Also, I’m still unfamiliar with @BINDINGS (a need to read a good tutorial since the documentation didn’t due it for me. If I put @INHERIT in the default value, do I need to put more parameters, or will it work with just putting the @INHERIT in there?

                    To calrify the null==|| you threw in there, that’s kinda like putting an ’unselect’ or empty value in, right? My client just asked me for a way to deselect the TV values from the MultiSelect I setup for them today and all I could come up with is None==
                    ||Option 1...

                      • 33372
                      • 1,611 Posts
                      You can deselect the values in a multi-select listbox by holding down the Ctrl key and clicking on the selected options to deselect them (probably the Option key on the Mac).
                        "Things are not what they appear to be; nor are they otherwise." - Buddha

                        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options