Using Variables in Comments Module [solved]
Posted: Sat Dec 01, 2007 6:17 pm
Website: http://benlueders.com
I am using the Comments / News Module combination to make a blog as per Elijah's method in the CMSMS documentation.
However, the client wants the ability to add comments right on the main blog page. So, I've done that, but run into a problem.
In the Comments display template, there is a call to {ExpandCollapse} that requires a unique id for each news item on the page. If the id is not unique, you get multiple expand collapse divs with the same div id. I got it to "work" this way, but when you post a comment, it attaches to the wrong news article.
So, I need a variable that contains a unique id for the news item that called the comments module to pass to {ExpandCollapse id="$uniqueID" title="$addcomment"}
I tried $pageid but that didn't work. Can someone point me to a list of the smarty-accessible variables in the Comments module, so I can answer this question myself? But, if you just want to give me the answer, that's cool too.
Thanks!
Ken Griffith
I am using the Comments / News Module combination to make a blog as per Elijah's method in the CMSMS documentation.
However, the client wants the ability to add comments right on the main blog page. So, I've done that, but run into a problem.
In the Comments display template, there is a call to {ExpandCollapse} that requires a unique id for each news item on the page. If the id is not unique, you get multiple expand collapse divs with the same div id. I got it to "work" this way, but when you post a comment, it attaches to the wrong news article.
So, I need a variable that contains a unique id for the news item that called the comments module to pass to {ExpandCollapse id="$uniqueID" title="$addcomment"}
I tried $pageid but that didn't work. Can someone point me to a list of the smarty-accessible variables in the Comments module, so I can answer this question myself? But, if you just want to give me the answer, that's cool too.
Thanks!
Ken Griffith