Author Topic: More fun with Nav Links  (Read 1078 times)

Offline Rivalyn

  • Newbie
  • *
  • Posts: 8
More fun with Nav Links
« on: Apr 24, 2012, 20:25:52 »
So read up on the previous postings about adding new nav links. Tried doing it after logout and that failed miserably. Now I'm trying to add it between home and help with code below. Cleared my cache and nothing. I'm sure it's something simple I'm missing.

Code: [Select]
{
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'amazon' => array(
'title' => $txt['amazon'],
'href' => 'http://www.amazon.com/?tag=test-20,
'show' => true,
'sub_buttons' => array(
),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),

Offline agent47

  • Support Team
  • Hero Member
  • *
  • Posts: 817
  • At your service?
    • Superhero Alliance
Re: More fun with Nav Links
« Reply #1 on: Apr 24, 2012, 21:23:23 »
You're right, it is something simple that you missed.
You forgot to close the link http://www.amazon.com/?tag=test-20 with a (')
That line should look like this:
Code: [Select]
'href' => 'http://www.amazon.com/?tag=test-20',
;)

Wedge is the way to go

Offline Rivalyn

  • Newbie
  • *
  • Posts: 8
Re: More fun with Nav Links
« Reply #2 on: Apr 24, 2012, 21:53:32 »
Actually sorry that's there, it came out when I killed the actual text. Here's the current code... and what it does is add space in between home and help with no button.
Code: [Select]
'amazon' => array(
'title' => $txt['amazon'],
'href' => 'http://www.amazon.com/?tag=test-20',
'show' => true,
'sub_buttons' => array(
),
),

Offline agent47

  • Support Team
  • Hero Member
  • *
  • Posts: 817
  • At your service?
    • Superhero Alliance
Re: More fun with Nav Links
« Reply #3 on: Apr 24, 2012, 22:10:41 »
Try this:
Code: [Select]
'amazon' => array(
'title' => 'Amazon',
'href' => 'http://www.amazon.com/?tag=test-20',
'show' => true,
'sub_buttons' => array(
),
),

Wedge is the way to go

Offline Rivalyn

  • Newbie
  • *
  • Posts: 8
Re: More fun with Nav Links
« Reply #4 on: Apr 24, 2012, 22:17:07 »
I think savior is the word I'm looking for :)

Worked perfectly, thank you.

Offline agent47

  • Support Team
  • Hero Member
  • *
  • Posts: 817
  • At your service?
    • Superhero Alliance
Re: More fun with Nav Links
« Reply #5 on: Apr 24, 2012, 22:21:59 »
:cheers:
No problem.

Wedge is the way to go