FontAwesome in a chunk

Trying to display a FA Icon in a chunk. all I get is this:

             <li><class="fa "></li>

Here is a piece of my chunk - everything else is displays (from the migX tv). I know I’m doing something really stupid and have tried all kinds of variations. Here is the portion of the chunk:

  • <class="fa "[[+faIcon]]>
  • Also, I have a template that has (with BS5) a row with two areas like so PER ROW, one on the left, one on the right. I can display my migX tv fine for the 1 row. But if I have more rows, how do I display this?

    The result could be even/odd. Would of course like to make sure that each row presents the appropriate number of items/row (i.e., 1st row - 2 items, 2nd row - 2 items (or 1) etc.

    I’m guessing I have to use twig - which is fine, but I can’t figure out how to get the total number of TV elements? If I can do this I can use some simple math and loop accordingly to display rows and elements/row.

    Not sure how to get the total number of migX count.

    Help here would be great as well.

    Tx, all.

    Move the closing double quote character (") after the placeholder → <class="fa [[+faIcon]]">.


    When calling the snippet “getImageList”, the code sets a placeholder “total” with the amount of processed items. (The placeholder name can be changed with the property &totalVar).

    [[getImageList?
        &tvname=`myTV`
    ]]
    Total = [[+total]]
    

    You can also provide different templates to “getImageList”, to display different rows:

    Property When used?
    &tplFirst for the first item
    &tplLast for the last item
    &tpl_2 for the second item (&tpl_n for the nth item)
    &tpl_n2 for all even items
    &tpl_oneresult only used if the items count = 1

    Inside the template chunks, you can also use these placeholders:

    Placeholder Description
    [[+idx]] the index of each item (1 for the first item)
    [[+_first]] value is 1 for the first row
    [[+_last]] value is 1 for last row
    [[+_alt]] value is 1 for even rows

    For really complex use cases, just write your own snippet code to output the data, as the MIGX TV-value is just a JSON array.

    halftrainedharry, thanks for this - tired eyes.

    However, changing it did not work.

    After muddling about for quite awhile, I realized that I was not loading FA CSS.

    I wrongly thought simply installing superboxfontawesome-2.0.3-pl AND superboxselect-3.0.7-pl everything would magically work - Not.

    I did notice one weird thing (not a showstopper).

    Downloaded fa v4.3.0 and tried to load FA from my local hard drive, but no FA icons would display on the front end, even tho the migX TV has the correct FA icon. I had to load from CDN.

    Interesting why this is, but not a big deal, the minified version is only 31kb.

    So 2 takeaways here; Don’t Assume anything and load the CSS…

    Thanks again for the pointer.