Topic-icon Links won't open in new window

Active Subscriptions:

None
10 years 3 months ago #40145 by robertjpeterson
Hi, everyone! Big fan of SCLogin here. Here's my problem:

On my module, I've activated a user menu. I've added a few links to it, including one link that I want to open in a new window. On the Joomla backend, I've set this link to open in a new browser window.

But on the front end, it's not working. The link still opens in the same window.

Any ideas? Thanks!!!!

ScLogin 3.2.1
Joomla 3.1.2
The topic has been locked.
Support Specialist
10 years 3 months ago #40210 by alzander
Robert,
Apologies for the delay! First, I'm glad to hear you like the SCLogin module. We put a lot of effort into it, so are always glad to hear it's being well received. We have a lot of improvements planned for it over the next few months as well that should make it even better.

As to your question.. well, you got us there! It looks like we don't support the new window option. It's a pretty simple fix to make the new window links open. To do so, please edit the /modules/mod_sclogin/helper.php file. Around line 465, you'll see:
return '<li><a href="' . $url . '">' . $item->title . '</a></li>';
Please update that one line with the 2 below:
$target = $item->browserNav == 1 ? ' target="_blank" ' : '';
        return '<li><a href="' . $url . '"' . $target . '>' . $item->title . '</a></li>';
That will work for the New Window and Current Window options. It won't work for the popup view though as that's a little more difficult (and much less used).

Please let me know how that goes for you. We'll be including this fix in the next release, but would love to have your feedback beforehand.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 2 months ago #41305 by robertjpeterson

alzander wrote: Robert,
Apologies for the delay! First, I'm glad to hear you like the SCLogin module. We put a lot of effort into it, so are always glad to hear it's being well received. We have a lot of improvements planned for it over the next few months as well that should make it even better.

As to your question.. well, you got us there! It looks like we don't support the new window option. It's a pretty simple fix to make the new window links open. To do so, please edit the /modules/mod_sclogin/helper.php file. Around line 465, you'll see:

return '<li><a href="' . $url . '">' . $item->title . '</a></li>';
Please update that one line with the 2 below:
$target = $item->browserNav == 1 ? ' target="_blank" ' : '';
        return '<li><a href="' . $url . '"' . $target . '>' . $item->title . '</a></li>';
That will work for the New Window and Current Window options. It won't work for the popup view though as that's a little more difficult (and much less used).

Please let me know how that goes for you. We'll be including this fix in the next release, but would love to have your feedback beforehand.

Thanks,
Alex


Alex, thank you so much for the detailed response! Unfortunately, that solution didn't work. I'm going to experiment with some other ideas, but any further feedback would be greatly appreciated! Thank you!!!
The topic has been locked.
Support Specialist
10 years 2 months ago #41324 by alzander
The new release of the SCLogin module with this update (and tons of others) will actually be available later today. You may just want to wait for it.

As to what may be causing the links to not open in a new window:
* The old links were cached. Please clear your Joomla and browser caches.
* The Menu item is not created to be an "Open in new window" type. We support "Open in current window" and "Open in new window". We do not support "Open in frame"

Let me know if either of the above helps, or the updated SCLogin that will be available in a few hours.

Thanks,
Alex
The topic has been locked.