When you click on banner open in _self not _blank

Discuss the development and implementation of Joomla! components here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
dano_east
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Mar 04, 2008 9:07 am

When you click on banner open in _self not _blank

Post by dano_east » Sat Jul 26, 2008 7:27 pm

Hello,

I have several banners operating on my site, they all promote content within the site. Rather than open in a new window I would like them to open in the same window when the banner is clicked.

Could someone point me in the right direction.

Many thanks in advance. Dan.

dano_east
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Mar 04, 2008 9:07 am

Re: When you click on banner open in _self not _blank

Post by dano_east » Mon Jul 28, 2008 7:45 pm

;D Don't worry fixed it myself.

Open file: mod_banners.php go to line 88 and change <a href="'. $link .'" target="_blank">
to
<a href="'. $link .'" target="_top">

Easy when you know how.

Cheers, Dano

User avatar
o_bridge
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Wed May 07, 2008 8:29 pm
Location: Montreal, Québec, Canada
Contact:

Re: When you click on banner open in _self not _blank

Post by o_bridge » Fri Aug 15, 2008 6:27 pm

Hi, I searched a bit for this in the code and I saw that there is a parameter for this. In the module that displays the banner, you can pick the target. Look at the Module Parameters on the right, the first field is Target. You can pick Parent Window with Browser Navigation.

Olivier

macaulus
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Nov 11, 2006 4:40 am

Re: When you click on banner open in _self not _blank

Post by macaulus » Wed Nov 04, 2009 3:01 am

saw that you can chnage the module to open up differnt sorts of links, i need to be able to do that from a banner level, i noticed some custom tag code and another area to add code, will this work to make a banner goto a new page, while another banner stays on parent ?

basically i have banners on a site, some link to pages within the site, other to external websites, i need a way to have the ones that link inside the website to use _parent and the ones that have external websites use the _blank.

Any ideas ?

macaulus

macaulus
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Nov 11, 2006 4:40 am

Re: When you click on banner open in _self not _blank

Post by macaulus » Tue Nov 10, 2009 10:36 pm

Bump on this one, any ideas, im beginning to feel that my questions just go unanswered, im getting no love from the joomla community it seems, if it cant be done within the core, a simple comment to say this would be suffice, again, not sure why im wirting this now, every post i have ever written on this forum goes unanswered.

Wait to hear from anyone, if im not alone in the void

macaulus

User avatar
o_bridge
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Wed May 07, 2008 8:29 pm
Location: Montreal, Québec, Canada
Contact:

Re: When you click on banner open in _self not _blank

Post by o_bridge » Wed Nov 11, 2009 2:23 pm

This is not available out of the core. You'd have to do some custom PHP code similar to what dano_east suggested. However, you'd have to do a check on $link to see if it's an external url or not and based on that, change the target.

macaulus
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Nov 11, 2006 4:40 am

Re: When you click on banner open in _self not _blank

Post by macaulus » Thu Nov 12, 2009 9:15 pm

bewdy, ill look into that, cheers for the reply


Locked

Return to “Components”