solved profile menu tab count

boplive
@boplive
8 years ago
345 posts
Hi guys is there a way to get a count for the profile menu tabs just the way there is a count for stats.
updated by @boplive: 08/15/16 12:42:28PM
michael
@michael
8 years ago
7,718 posts
?? you want to know how many tabs there are? what for? why not just count them.

--edit--
and where do you want to output it to, that makes a difference also. If its in the menu.tpl file where the tabs are displayed, you can just add a counter to the foreach loop.
updated by @michael: 05/13/16 08:55:43PM
boplive
@boplive
8 years ago
345 posts
sorry about how i phrased it,,,hehehhee i know how many tabs i have...
i want to show in the profile menu the amount of pictures a profile has...so if they have 5 pictures in there gallery..it will show gallery 5.
I guess its stmilar like how the stats are.

So just add a counter to the foreachloop...let me see what i can come up with ...ill start doing some research to figure it out..
michael
@michael
8 years ago
7,718 posts
yeah, bit hard to understand, got it now though. What you're after is 'return_count'

{jrCore_list module=$module profile_id=$_post._profile_id return_count="true"}

Docs: "{jrCore_list}"
https://www.jamroom.net/the-jamroom-network/documentation/development/89/jrcore-list

If you put that code into your menu.tpl it will return the count of the items rather than the content of the items. Just make sure all the variables line up. If it doesnt work immediately, throw a {debug} in there and get the right variable names for the jrCore_list call.

Docs: "{debug}"
https://www.jamroom.net/the-jamroom-network/documentation/development/1477/debug
boplive
@boplive
8 years ago
345 posts
Thnx Michael..I placed it after the function..and it worked. :)

Tags