Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: irondutchess - elokuu 10, 2013, 06:36:22 AP

Otsikko: New tab or window in button URL
Kirjoitti: irondutchess - elokuu 10, 2013, 06:36:22 AP
I used the tutorial in 'Tips and Tricks' to add a new button to the menu and made a social.gif button.  This works very well and social.gif displays okay, and link to /social/index.htm works okay.

How do I change the code below to get /social/index.htm to open in a new tab or window?

'social' => array(
'title' => $txt['social'],
'href' => '/social/index.htm',
'show' => true,
'sub_buttons' => array(
),
),


Nell Bryden Fans (http://nellbrydenfans.com) Site where new menu item has been added.

TIA
Chris
Otsikko: Re: New tab or window in button URL
Kirjoitti: Kays - elokuu 10, 2013, 07:59:42 AP
Hi, this should do it. :)


'social' => array(
'title' => $txt['social'],
'href' => '/social/index.htm',
'show' => true,
                                'target' => '_blank',
'sub_buttons' => array(
),
),
Otsikko: Re: New tab or window in button URL
Kirjoitti: irondutchess - elokuu 10, 2013, 08:30:30 AP
And it did  :)

Many thanks.

Just have to get the social networking software up and running now  ???    "My brain hurts"  :laugh:
Otsikko: Re: New tab or window in button URL
Kirjoitti: Kays - elokuu 10, 2013, 08:46:15 AP
Great, the best of luck with your site. :)

I'll mark this as solved then.