We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19872
    • 1,078 Posts
    In regard to the Checkbox. Works great, but allows the user to check both. So... I changed to Radio Button. Only problem here is that the user MUST select one or the other even though I have left YES in the field for "Allow Blank"
    Perhaps I need to modify the Input Option Values to include a show none option.

    Maybe : show slider==[[$sliderChunk]]||show image==[[$singleImageChunk]]||show none==[[]]

    Input Options
    Input Type: Radio Button
    Input Option Values: show slider==[[$sliderChunk]]||show image==[[$singleImageChunk]]
    Default Value: (left empty)
    Allow Blank: YES
    Columns: 1

    Output Options
    Output Type: Default
      • 19872
      • 1,078 Posts
      I inserted this into my Input Type and it seemed to work. I am able to select show none on the resource and no code gets generated. I don't know whether ==[[]] is correct or not, but it was what came to mind for something that would be empty.

      show slider==[[$sliderChunk]]||show image==[[$singleImageChunk]]||show none==[[]]
        • 4172
        • 5,888 Posts
        Its better to create a new thread for each different issue!

        To get the description-part, only if not empty:

        <li>
          <img src="[[+image]]" alt="[[+description:htmlentities]]" />
          [[+description:!empty=`<div class="orbit-caption">[[+description]]</div>`]]
        </li>


        your input-options should look like that:

        show slider==[[$sliderChunk]]||show image==[[$singleImageChunk]]||show none==


          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 4172
          • 5,888 Posts
          your slider chunk should have this code:

          <ul class="class="dh_orbit" data-orbit data-options="timer_speed:4000; slide_number:false;"">
              [[getImageList? &tvname=`deserthills.images` &tpl=`deserthills.images.gallery.tpl`]]
          </ul>
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 19872
            • 1,078 Posts
            But I have so many issues:) My apologies for unloading.

            I'm reading DOCs on MIGx back-end usage now trying to get a better understanding.

            show none== and !empty= are both very helpful. Thank you.
              • 4172
              • 5,888 Posts
              To get the url to resources working, and you have a resource-id in your link-field, try this:



              <li>
                [[+image-link-path:isnot=``:then=`
                <a href=`[[~[[+image-link-path]]]]`><img src="[[+image]]" alt="[[+description:htmlentities]]" /></a>
                `:else=`
                <img src="[[+image]]" alt="[[+description:htmlentities]]" />
                `]]
                [[+description:!empty=`<div class="orbit-caption">[[+description]]</div>`]]
              </li>


                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 19872
                • 1,078 Posts
                yikes. something went south after adding: [[+description:!empty=`<div class="orbit-caption">[[+description]]</div>`]] Display contains code referring to array this or that.
                  • 19872
                  • 1,078 Posts
                  Adding in the ul info you provide remedied the situation. Thank you for helping out.

                  Now I need to do some more reading to better understand it all. I think maybe I need to add an item to my MIGx form for the Orbit so that a user has the ability to omit a caption/description for a photo, but still insert an alt tag. At the moment, with my current configuration it appears as though the photo caption and the alt tag are one and the same.

                  I am humbled and very appreciative of your expertise and helpfulness.

                    • 19872
                    • 1,078 Posts
                    Quote from: Bruno17 at Feb 16, 2014, 12:28 PM
                    To get the url to resources working, and you have a resource-id in your link-field, try this:



                    <li>
                      [[+image-link-path:isnot=``:then=`
                      <a href="`[[~[[+image-link-path]]]]`"><img src="[[+image]]" alt="[[+description:htmlentities]]"></a>
                      `:else=`
                      <img src="[[+image]]" alt="[[+description:htmlentities]]">
                      `]]
                      [[+description:!empty=`<div class="orbit-caption">[[+description]]</div>`]]
                    </li>




                    Actually defaults to home/site_start page with two back ticks. This occurs whether entering a full url (http://www.....) or [[~10]]
                    I see in your code you have the tilde, so I tried enter just the number 10, at which point the image doesn't even display.

                    I see your reference of "url to resource" so this would be only for clicking to another location within the site. Maybe the back ticks are not necessary, and then only the number of the resource need be entered into the image link field. [ed. note: mmcgee last edited this post 12 years, 7 months ago.]
                      • 19872
                      • 1,078 Posts
                      <a href="`[[~[[+image-link-path]]]]`">


                      Removing the back ticks in this section works! I can enter just the number of the resource to link to, and it works.

                      because if +image-link-path = 10, that phrase above equates to [[~10]] which would be link to resource id10. Whew!