solved Help creating a menu item

alt=
@mail28055
6 years ago
6 posts
I need to create a menu item that takes people to their time line.

Obviously the usual way would be www.example.com/(user profile name)/timeline but I cant use that as the link can only be set to one profile.

I want any user to click a link and they then get taken to their own timeline but cant seem to work this out.

Thanks all
updated by @mail28055: 03/02/19 05:45:03PM
nate
@nate
6 years ago
917 posts
You want to use the menu editor.
paul
@paul
6 years ago
4,326 posts
Hi - Welcome to Jamroom.

To construct that link in a template use this -

{$jamroom_url}/{$_user.profile_url}/timeline

The contents of the curly brackets are smarty variables that are passed to the templates for parsing. To see what smarty variables are available for use in a template, insert a {debug} into the top of the template and a popup will be launched showing all variables. Docs. here - https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug

Hope that helps


--
Paul Asher - JR Developer and System Import Specialist
alt=
@mail28055
6 years ago
6 posts
Thanks so much Paul. Thats exactly what I needed.
michael
@michael
6 years ago
7,715 posts
$_user is the user looking at the screen
$_profile is the profile being looked at
$_conf is all the global settings

You seam like your getting into the good stuff quickly so these docs could be useful

Docs: "{debug}"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug

Not all variables are the same everywhere, so {debug} helps you understand what you have to work with wherever you are.

and {jrCore_list} is the main go-to function from templates to get stuff from the database.

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

Tags