Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 03:26 pm EST

Geeklog Forums

Launch new browser window


Status: offline

alinford

Forum User
Regular Poster
Registered: 01/06/03
Posts: 96
Is there any way that I can do a target="_blank" on one of the menu items in the top nav bar?
 Quote

Anonymous

Anonymous
yes
 Quote

Status: offline

ScurvyDawg

Forum User
Full Member
Registered: 11/06/02
Posts: 523
so how is it done then.
 Quote

Anonymous

Anonymous
Oh, you want to know HOW to do it. On some themes, the top nav bar is listed out as separate links. If your theme is like that, then you'll modify the links in the header.thtml file. For example, this is the site stats link in the XSilver theme: <a href="{site_url}/stats.php" inmouseover="filter('d703','d854')" inmouseout="filter('d703','d290')"> <img border="0" src="{layout_url}/images/stats.gif" name="d703" width="125" height="22" alt=""></a> To make it open in another window, you insert target="_blank" like this: <a href="{site_url}/stats.php" inmouseover="filter('d703','d854')" inmouseout="filter('d703','d290')" target="_blank"> <img border="0" src="{layout_url}/images/stats.gif" name="d703" width="125" height="22" alt=""></a> You can modify whichever links you want opened in a separate window the same way. If your theme uses {menu_elements} or {plg_menu_elements}, you can't be selective on which ones to open in another window. It's all or none. In this case, you would insert target="_blank" in the <a> tag located in the menu.thtml and menuitem_last.thtml files. If you want some but not all to open in another window, then you'll have to list each link out separately in the header.thtml file.
 Quote

Status: offline

alinford

Forum User
Regular Poster
Registered: 01/06/03
Posts: 96
Thanks for the help. I just created a new template (menuitem_launch.thml) where it launches another browser, added the reference to the lib_common and then added the item to the menu in lib_common. Worked great.
 Quote

Anonymous

Anonymous
Yes, that'll work too.
 Quote

All times are EST. The time is now 03:26 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content