Mojo
New Member
Posts: 7
inherit
187058
0
Aug 13, 2016 12:12:43 GMT -8
Mojo
7
December 2012
kadina
|
Post by Mojo on Aug 11, 2016 13:51:03 GMT -8
Hello there!~ I'm trying to create a toggle sidebar to essentially function as a user's dashboard when they are logged in, and I want it to have a section that displays their online friends names. I've got the toggling sidebar down, but when I tried to copy the "friends" section of the user profile into the sidebar, nothing shows up except for the number of online and offline friends. However, I noticed that when I access the sidebar from the "friends" page of my profile, the user's name (and miniprofile) shows up in my sidebar. Basically, this is my design [see attached]. Also, since the middle section is basically a custom field section, would this require a plugin? Any and all help would be much appreciated! I really hope this template is possible to do... Thank you ^_^ Attachments:
|
|
#eb7100
33409
0
1
Apr 14, 2024 15:59:10 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Aug 11, 2016 14:32:55 GMT -8
Hi, Mojo. The layout template variables for the Friends tab of the User Profile template are unfortunately specific to that template and cannot be utilized elsewhere. They'll only output values when visiting the Friends page they originated from. The rule of thumb for template variables is that if they aren't listed in the sidebar on the right they probably can't be used in the template you're viewing.
|
|
Mojo
New Member
Posts: 7
inherit
187058
0
Aug 13, 2016 12:12:43 GMT -8
Mojo
7
December 2012
kadina
|
Post by Mojo on Aug 11, 2016 14:49:20 GMT -8
Ah, okay. Thank you! Would the custom fields still be possible?
|
|
#eb7100
33409
0
1
Apr 14, 2024 15:59:10 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Aug 11, 2016 14:53:01 GMT -8
The $[current_user] variable works in every template, so you should be able to produce the custom fields of the account you're logged in as without issue.
If you're using {foreach $[user.custom_field]} for the middle section consider substituting each instance of user with current_user in the part of the template that produces each of those. That way it's getting the information from your account and not trying to obtain profile information from the page you're viewing.
|
|
Mojo
New Member
Posts: 7
inherit
187058
0
Aug 13, 2016 12:12:43 GMT -8
Mojo
7
December 2012
kadina
|
Post by Mojo on Aug 11, 2016 15:02:21 GMT -8
You're a national treasure <3 Thank you, Brian. I guess this is where I post that the issue has been resolved? er... case closed? meh, something like that Thanks again!
|
|