Jump to content
  • 0
Petey Pablo

Target new tab

Question

1 answer to this question

Recommended Posts

  • 0

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.