Fork me on GitHub

Setting things in the menu with target="_blank"  Bottom

  • I am having serious problems getting this to work. Anyone care to gimmie some advice on the subject? My problem is that I want one of the links in the menu field of my postnuke to launch in a new window...

    Anyone?
  • Try using the format of

    Quote

    " target="_blank
    to get your link to open a new window.

    Hope this helps.
  • When you add a link in the menu in postnuke, you add just the URL, not any HTML tags, so that wont work...
  • Actually it will work. Here is how I use it on my own site.

    Just for starters, let's look at the Moodle elearning system which I use. It isn't a PostNuke module, isn't integrated into myPostNuke site at all with the pnMoodle utility since I wanted to keep my elearning user base separate from my PostNuke base.

    In my menu this is the way I have it set so that when you are on my PostNuke site and you click the eLearning link Moodle will open up in a new window for you. Give it a try and see, just go to my site, click on eLearning, and see if a new window doesn't open up.

    I didn't have any actual PostNuke modules opening up into a new window, but I played around with one and also got it to work. Here is how you would do it

    Quote

    index.php?module=pnEncyclopedia&func=main"target="_blank
    In this particular case I just played around with the pnEncyclopedia module. True, you do have to specify the line differently than if you were just calling the module by itself since the standard way of calling this particular module is

    Quote

    {pnEncyclopedia}


    I have set my pnEncyclopedia module back to normal for now so it won't open a new window if you visit my site. However, if you use the same format on your site, just replacing the module name with whatever module you are wanting to open in a new window, it should open up in a new window for you.

    Hope this helps.
  • I'm trying to do a link to a launchcast station where it opens in a new window. I tried your solution but it still doesn't seem to work quite right. Check out http://www.beatleblog.com and click on BeatleBlog Radio in the menu.

    Currently the link in the menu block looks like http://launch.yahoo.com/lc/?rt=0&rp1=0&rp2=1215317577"target"=_blank

    While the launchcast player will open in a new smaller window you are still transferred from my site to the launchcast site.

    Any ideas?
  • little details ...

    should be ..."target="_blank,
    NOT ..."target"=_blank

    Note the = needs to be within the quotes.

    BTW, you can leave off the

    Code

    http://www.yoursite.com
    portion of the URL, and just use the URL fragment following this, if it is w/in your site. At least that works for me.

    Again tho,
    I would highly encourage you to follow "best practices" guidelnes, and NOT force opening in a new window. This is always a user option, using a right click - open in new window command.
    If you FORCE opening in a new window, the user conversely does not have the choice of selecting to open in same window.

    Having said this, I do have to admit that there are places in my sites where I have seen fit to violate this "best practices" recommendation. Slap my own hands, I do. :twisted:
  • Ok, I have also tried everything and I can't get a new window to pop up from a link in my main menu.

    I copied exactly like you said and its not working...any known alternatives?

This list is based on users active over the last 60 minutes.