Jump to content
  • 0

Target new tab


Petey Pablo

Question


  • Group:  Members
  • Topic Count:  152
  • Topics Per Day:  0.03
  • Content Count:  569
  • Reputation:   11
  • Joined:  11/24/11
  • Last Seen:  

How to make this target new tab

'JoinUsInFacebookLabel'	=> array('exturl' => 'https://www.facebook.com/<facebook_link>'),

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   12
  • Joined:  09/14/21
  • Last Seen:  

Check the "./themes/default/main/sidebar.php" file on line (45) :

<th class="menuitem"><strong><?php echo htmlspecialchars(Flux::message($menuCategory)) ?></strong></th>
        </tr>
        <?php foreach ($menus as $menuItem):  ?>
        <tr>
                <td class="menuitem">
                        <a href="<?php echo $menuItem['url'] ?>"<?php
                                if ($menuItem['module'] == 'account' && $menuItem['action'] == 'logout')
                                        echo ' onclick="return confirm(\'Are you sure you want to logout?\')"' ?>>
                                <span><?php echo htmlspecialchars(Flux::message($menuItem['name'])) ?></span>
                        </a>
                </td>
        </tr

The Anchor behavior appears to be hardcoded, affecting all menuItem objects the same.

See the following W3schools entry:
https://www.w3schools.com/tags/att_a_target.asp

The (target="_blank") Attribute would need to go in here.
You will need to develop logic to check for the appropriate module and action, otherwise all links will open in a new tab.

Edited by WooZy
Removed an unwanted emoji
  • Upvote 1
Link to comment
Share on other sites

×
×
  • Create New...