1
ddevore
Open Module in new Window
  • 2005/3/25 19:10

  • ddevore

  • Just popping in

  • Posts: 47

  • Since: 2005/3/8 1


I am wanting to add a link to the main menu that will open in a new window. I have created a simple module for it but I need the open the link in a new window. Is there a way to do this or am I going to have to use something such as multimenu or WF-Sections?

Thanks

2
dickinsd
Re: Open Module in new Window
  • 2005/4/2 23:41

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Not sure I know exactly what you want?

If you want to add a link to the MAIN MENU for a page or module and you want it to open in a new page try this:

edit your system_block_mainmenu.html template.

You need to add the text that I have made Bold

<table cellspacing="0">
<
tr>
<
td id="mainmenu">
<
class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}></a>
<!-- 
start module menu loop -->
<{foreach 
item=module from=$block.modules}>
<
class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a> <{foreach item=sublink from=$module.sublinks}>
<
class="menuSub" href="<{$sublink.url}>"><{$sublink.name}></a>
<{/foreach}>
<{/foreach}>
<!-- 
end module menu loop -->
[
b]<class="menuMain" href="<{$xoops_url}>/[i]path to module or html page[/i]" [size=medium][color=990000]target="_blank"[/color][/size]>[i][u]yourtext[/u][/i]</a>[/b]
</
td> </tr>
</
table>

You can add as many links as you want this way, unfortunately they will all go to the bottom of the modules list. (I think - never needed to try it myself)
The key part that I think your after is target="_blank" the terget="_blank" is the code to open the link in a new window.

Alternativly you could use something like MultiMenu to create a new MAIN MENU you can have any links you want in any order you want and when you setting the links you can choose to have them open in the same window or in a blank window.

MultiMenu:
https://xoops.org/modules/repository/singlefile.php?cid=43&lid=1423

Dave

Login

Who's Online

216 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 216


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits