solved How do i call a Chained menu function

alt=
duke
@musamensa
7 years ago
253 posts
Hi,
I have created a chained menu to replace 'profile_location' but i am having difficulties with getting it to display. The new function is called profile_hometown but when i add the following codes
{$item.profile_hometown} nothing is displayed.

The file i am editing is the profile_info.tpl

thanks again.
updated by @musamensa: 04/27/17 04:54:25AM
michael
@michael
7 years ago
7,718 posts
not enough info to get a full picture of what you're trying to do.

Docs: "Chained Select"
https://www.jamroom.net/the-jamroom-network/documentation/modules/1753/chained-select

Perhaps you could tell us which part of the docs need some extra explaining. That will help make that page more useful to everyone.

Thanks :)
alt=
duke
@musamensa
7 years ago
253 posts
i get the video i have watched it a few time, my problem is displaying the chained menu output in the info section of the profile page. {$item.profile_hometown} dose not work. Since a chained menu displays multiple values would i need to add more codes ?
paul
@paul
7 years ago
4,326 posts
'profile_hometown' is the overall name of the field. To get individual elements of the chain use {$item.profile_hometown_0}, {$item.profile_hometown_1} etc.
Tip - Temporarily put a {debug} in your template to see all variables available to the template.


--
Paul Asher - JR Developer and System Import Specialist
alt=
duke
@musamensa
7 years ago
253 posts
thanks @paul you nailed it, however i had to use {$profile_hometown_1} without the '$item' it dint work with '$item.'
paul
@paul
7 years ago
4,326 posts
duke:
thanks @paul you nailed it, however i had to use {$profile_hometown_1} without the '$item' it dint work with '$item.'

When you are using a profile template the variables are available directly.
Glad you're sorted. Marking this thread as solved.


--
Paul Asher - JR Developer and System Import Specialist

Tags