Profile Menu

PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
I am working in /core/skin_menu

I am trying to get this code to work as a menu item labeled "My Profile"

{$jamroom_url}/{jrUser_home_profile_key key="profile_url"}

Since it won't work in its current form in the menu, is there another way to achieve the same link?

Appreciate the help.


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

updated by @the-patria-company: 10/19/16 01:09:11AM
SteveX
SteveX
@ultrajam
8 years ago
2,584 posts
That template is the default which is probably overridden in your skin as menu.tpl

Try putting your code into your skin menu.tpl and see if that does the trick.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
Very close!

I added this code to line 1 of my menu.tpl
<li><a href="{$jamroom_url}/{jrUser_home_profile_key key="profile_url"}">My Profile</a></li>

The menu item appears when I am on my own profile, but does not show when I am viewing another profile.

Any thoughts?


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
douglas
@douglas
8 years ago
2,790 posts
Give this a try:

<li><a href="{$jamroom_url}/{$_user.profile_url}">My Profile</a></li>

You'll most likely need to wrap that in a jrUser_is_logged_in if statement as it should only show to logged in users.

{if jrUser_is_logged_in()}
<li><a href="{$jamroom_url}/{$_user.profile_url}">My Profile</a></li>
{/if}

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
Same thing :/ When I visit any page, other than my own profile, the "My Profile" menu item does not appear. Here is my entire menu.tpl

<li><a href="{$jamroom_url}/{$_user.profile_url}">My Profile</a></li>
{foreach from=$_items name="loop" item="entry"}
    {if isset($entry.menu_function_result) && strlen($entry.menu_function_result) > 0}
        {if is_numeric($entry.menu_function_result)}
        <li><a href="{$entry.menu_url}">{$entry.menu_label} [{$entry.menu_function_result}]</a></li>
            {else}
        <li><a href="{$entry.menu_url}">{$entry.menu_label} <img src="{$entry.menu_function_result}" alt="{$entry.menu_label}"></a></li>
        {/if}
        {else}
    <li><a href="{$entry.menu_url}">{$entry.menu_label}</a></li>
    {/if}
{/foreach}



--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

updated by @the-patria-company: 07/07/16 12:06:13PM

Tags