I am new to this and trying to help someone finish up his modx site. I’ve been searching all morning and can’t seem to find what I’m looking for, so bear with me if it’s a dumb question.
I have created a TV called contributing_authors that looks like this:
@SELECT pagetitle, id FROM site_content WHERE parent = 90
It is a multi-select list box.
The parent folder contains biographies of the contributing authors.
My problem is that when I output [+contributing_authors+] in a chunk, only the id part is displayed and I need to make their names (the ’pagetitle’ part) display. I need to be able to access both the id and the pagetitle in order to make a clickable link on a summary page to each contributor’s biography, if that makes any sense.
Is there a way to neatly get the different pieces stored in a TV? I wrote a snippet to do it on the individual article pages, but it won’t work in the chunk which displays a summary of each article on the main page. THANKS!
Maybe it would help if someone could tell me the difference between [+TVname+] and [*TVname*] and if there are any other ways of getting the data stored in the TV.
[+tvname+] in Ditto template chunck (also other snippets)
[*tvname*] in site template. This is the main way the other is the snippet way.
Thanks. I did create the snippet and got it working on the content pages, but it’s not working on my index page for some reason. Oh well...I’ll get it. I was just hoping that it was all saved to the database and could be accessed by something nifty like [*TVname[pagetitle]*] . Thanks for the help.