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
    So just testing the waters here on this and trying to determine what's possible, and more so, what is doable for me.

    I have a home page with a full screen slider, and use a MIGx TV to control what appears in the slider. For now, it's an image of course, a title, a tagline and a price. Clicking on any of the above links to a resource related to what's being displayed in that slide.

    In reviewing my setup, I'm wondering if there is a way to improve the setup. At the moment, there is a bit of double entry going on. For example, I have to enter a price on a given resource, and then if I want to feature that resource within the home page slider, I have to enter the price again in MIGx. As well, if the price changes —I have to change it on the slider. This doubling up is of course tedious, redundant, and potentially allows room for error.

    So, I'm wondering—is there a way to simply pull directly from each resource the bits of information I want for use on my home page slider? (a main image, title, etc. etc.)

    Is there a way to make entries into my MIGx TV that would pull for example the Main Image from resource 9, and also the title from resource 9, and the price from resource 9 etc.

    Or is there another way to approach this? Maybe using pdoResources—with a goal of having a check box on each resource that gets checked if I want it to display certain content in my slider on the home page.

    This could be something that is really simple to do, or really complex requiring a lot of custom php. Not sure. Thought I'd toss out the question and get a feel for what I might be in for.

    [
    {"header": "Image", "sortable": "false", "dataIndex": "image","renderer": "this.renderImage"},
    {"header": "Alt", "sortable": "true", "dataIndex": "alt"},
    {"header": "Title", "sortable": "true", "dataIndex": "title"},
    {"header": "Tagline", "sortable": "true", "dataIndex": "tagline"},
    {"header": "Price", "sortable": "true", "dataIndex": "price"}
    ]


    For now my MIGx grid is set up like most, where you enter the information into the fields. I think what I'm asking is if there is a way to tie the field to a resource, like entering the resource ID, and the TV name. Or better yet, just enter the resource ID, and have the alt, title, tagline, price, image all get pulled together for that slide.

    On my resource the TV name for price is propPrice. So is there a way maybe to tie the resource ID and propPrice together in MIGx to put it on the slide?
    [ed. note: mmcgee last edited this post 11 years, 7 months ago.]
      • 36573
      • 173 Posts
      You should be able to us pdoResourses with the resources setting ("&resources="9,15,20") this was you could just input the resource id that you want. Then you can pull the data using a template chunk.

      To add a checkmark to indicate the resources you'd have to add a &where statement to your pdo call.
        Everything I know I learned on the internet. Saved me thousands in College tuition,
        • 19872
        • 1,078 Posts
        Thanks for the quick response.
        Can I use a TV for inserting the resource numbers, so I could edit them on my home page resource rather than opening the chunk each time?
        ("&resources="[[*resourcesToDisplay")
          • 19872
          • 1,078 Posts
          I'm OK with editing the chunk. Will set this up the the morning and give it a go. Seems like I got myself all worked up into a frenzy and this might very well be much easier to do that I expected. Whew!
            • 36573
            • 173 Posts
            I would think the tv would work. I've done this same thing with my sliders. It's pretty straight forward is you understand pdoResourses.
              Everything I know I learned on the internet. Saved me thousands in College tuition,
              • 19872
              • 1,078 Posts
              So far so good. This works slicker than snot on a glass doorknob! smiley

              At the moment I have a link to a resource hard coded.
              <p><a href="[[~9]]">[[+tv.propTitle]] $[[+tv.propPrice]]</a></p>


              How do I modify this to relate the href to the currently loaded resource?

              Aha!

              [[~[[+id]]]]


              [ed. note: mmcgee last edited this post 11 years, 7 months ago.]