Hey,

Is there any way I can create a My Account link in the primary links (accross the top of my site) that would be relevant for each user?

such as a link to www.site.com/user/[user number]

I would like to get rid of the navigation block and just have primary and secondary links to simplify my site for users.

Any help greatly appriciated!

Zoo,
www.pinkwest.com

Comments

dobson’s picture

Here's how I do more or less the same thing.

In page.tpl.php (assuming you're using a phptemplate theme) where this is printed:

<?php print theme('links', $primary_links) ?>

I change it to something resembling this:

<?php global $base_url; global $user; $primary_links[] = "<a href='$base_url/user/$user->uid'>My Account</a>"; print theme('links', $primary_links) ?>

I've no idea how to add a menu item like this one to the primary links dynamically.

adgaadga’s picture

Thanks but any idea how I'd do that for Gray_Box the PHP for the link section is like this.. tried a couple of things but couldn't figure it out

<div id="top-nav">
  <?php if (count($secondary_links)) : ?>
    <ul id="secondary">
    <?php foreach ($secondary_links as $link): ?>
      <li><?php print $link?></li>
    <?php endforeach; ?>
    </ul>
  <?php endif; ?>
  
  <?php if (count($primary_links)) : ?>
    <ul id="primary">
    <?php foreach ($primary_links as $link): ?>
      <li><?php print $link?></li>
    <?php endforeach; ?>
    </ul>
  <?php endif; ?>
</div>

webmaster
pinkwest.com