Getting template variable to show on Front End

I am using MGIX to make a tabbed accordion style element section no my pages. The tabs TV show up in my Resources’ Template Variable section but it will not show on the front end of my website.

What should I put in the Chunk to make it show.
Note: each tab can have different content placed in them depending on the page.

You need to use getImageList to output the data. Just replace the placeholders with the fields that you’ve setup in your MIGX. Also replace the tvname to whatever you called your MIGX tv.

[[getImageList? 
    &tvname=`myMIGXtv`
    &tpl=`@CODE:<li>[[+idx]] - [[+title]]</li>`
]]

That didnt work. Below are what the tabs look like ( If you click the plus sign it expands to show more content).
Right now this shows up on every page that has that template assigned to it. I only want it to show up on the page I select that particular TV for.

Some more of your code (MIGX TV, chunk, call) could probably help to see where the issue is.

Im just trying to get the steps. Should it be this…

  1. Create a TV
  2. Create a Chunk with the code for the Accordion
  3. Add Item to MIGX
  4. put code in Template

“…but it will not show on the front end of my website”

“Right now this shows up on every page that has that template assigned to it. I only want it to show up on the page I select that particular TV for.”

I’m a little confused between these two statements. As vibe suggested if you post your code we can probably help a little more. Essentially though the steps you’ve declared in your latest post are correct.

Assuming you’ve set this up as a MIGX TV and the data for the accordion is populated within the template variables tab for the accordion that you’ve set up, then it should only display for that resource. If that’s not the case then you could try calling the snippet uncached by putting an exclamation infront of the snippet name: [[!getImageLi...]].

The developer before me used this code to call in a TV in their page builder. They put several TV’s in one chunk called Page builder.

They have 8 things called in this Chunk from MIGX. I want mine too show up in this list but when I add the below code to it, it shoows multiple times on a page:
[[getImageList?
&tpl=Accordion
&tvname=Accordion
]]

Here is the link: http://dev.sorghumcheckoff.com/ethanolvideo

I can’t see anything, which shows multiple times on this page

page looks pretty good, for the multiple times do you mean the two sets of flipping pictures? They appear near the top and then way down near the bottom as well.

everything seems to be working, with your three tabs, just the extra set of flipping pictures, that’s done with js, right? you must be triggering the js again, perhaps with a class?

Not sure what I did but I figured it out. It no longer shows multiple times.

Thanks!

1 Like