If a customer would like to link to the profile page on a portal, but not in the navigation (usually in footer), it requires a bit of Javascript. See the solution below:


In order to return the path with the contact ID in the string we need to crawl the DOM with javascript to copy the url directly from the page Id which is `ContentPlaceHolder1_hplProfileEdit`.

In short, if you place the following in your theme's Javascript:


function dmLoad(){
if ( $('body[class*="customer"]').length > 0 ) {

var x = document.links.namedItem("ctl00_ctl00_ContentPlaceHolder1_hplProfileEdit").href; 

document.getElementById("profilelink").href = x; };
};


and place the Profile link in the footer inside an a tag with the id of "profilelink" like so:


<a id="profilelink">My Profile</a>


It should link nicely to the profile page.



IMPORTANT:


Version 3.15 Javascript:


function dmLoad(){

if ( $('body[class*="customer"]').length > 0 ) {

var x = document.links.namedItem("hplProfileEdit").href; 

document.getElementById("profilelink").href = x; };

};