Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Pop new window

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #11  
Old 06-27-2014, 12:16 PM
 
BRDgirl BRDgirl is offline
 

Advanced Member
  
Join Date: Feb 2014
Posts: 33
 

Default Re: Pop new window

Thanks so much for the follow-up Tony - I will look forward to hearing from you.

Quote:
Originally Posted by tony_sologubov
Hi Belinda!

Sorry for being silent on this task for a while. I did not forget about this task and I will come to it in two weeks. I will keep you posted.

Tony.
__________________
Belinda Karls-Nace
Blue Ribbon Designs
X-Cart Business 5.2.5
Reply With Quote
  #12  
Old 09-29-2014, 11:38 AM
 
GreatLakesVacuum GreatLakesVacuum is offline
 

eXpert
  
Join Date: Jan 2009
Posts: 286
 

Default Re: Pop new window

I would like to know this as well. It seems your not able to add a target="_blank" in the link like you could in X-Cart 4?
__________________
X-Cart 4.5.4 Gold (Live Business Site)
X-Cart 5.1.9 Business (In Development Now)
Reply With Quote

The following user thanks GreatLakesVacuum for this useful post:
totaltec (09-30-2014)
  #13  
Old 09-30-2014, 09:25 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Pop new window

Quote:
Originally Posted by GreatLakesVacuum
I would like to know this as well. It seems your not able to add a target="_blank" in the link like you could in X-Cart 4?
I think this needs to be added to the core. Pretty simple to make a module that changes this, but I think we need a checkbox for this on all menus created by Simple CMS module.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following 2 users thank totaltec for this useful post:
BRDgirl (10-20-2014), GreatLakesVacuum (09-30-2014)
  #14  
Old 10-13-2014, 06:24 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Pop new window

Guys, sorry it took me incredibly long to create the mod. Here we go:
https://dl.dropboxusercontent.com/u/23858825/Tony-CMSLinksAdjustment-v5_1_0.tar

In order to make a link open in a separate window, you have to go to the classes/XLite/Module/Tony/CMSLinksAdjustment/CDev/SimpleCMS/View/Menu/Customer/FooterMenu.php file and add the name of the link into the $linksInSeparateWindows variable.

The module contains three files except Main.php:
- CDev/SimpleCMS/View/Menu/Customer/FooterMenu.php class is for walking through each menu entity and adding 'aboutBlank' to certain menu items
- View/Menu/Customer/Footer.php is for overriding default template of footer area
- skins/default/en/modules/Tony/CMSLinksAdjustment/footer_menu.tpl is a new template that will consider 'aboutBlank' attribute of menu entity.

Finally, as about adding this functionality to core, just registered it in our internal TODO list.

Please, let me know if there are any questions about this mod.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote

The following 2 users thank tony_sologubov for this useful post:
BRDgirl (10-20-2014), totaltec (10-13-2014)
  #15  
Old 10-13-2014, 06:34 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Pop new window

Thanks Tony. I ended up adding a new column to the menu table, so you can just check a checkbox if you want the link to open a new window.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following user thanks totaltec for this useful post:
tony_sologubov (10-13-2014)
  #16  
Old 10-13-2014, 06:37 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Pop new window

This is even better, Mike!
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #17  
Old 10-28-2014, 07:48 AM
 
BRDgirl BRDgirl is offline
 

Advanced Member
  
Join Date: Feb 2014
Posts: 33
 

Default Re: Pop new window

Thank you so much for creating this module Tony - with your assistance, I was able to install the module and it works perfectly - YAY! My question is, I still have one link in my primary menu that I would like to open in a new tab - am I correct in assuming this module only works for the footer menu? Is there an easy way to have the same outcome with a link in the primary menu? Thanks for your help...

Belinda
Blue Ribbon Designs
X-Cart Business 5.1.8

Quote:
Originally Posted by tony_sologubov
Guys, sorry it took me incredibly long to create the mod. Here we go:
https://dl.dropboxusercontent.com/u/23858825/Tony-CMSLinksAdjustment-v5_1_0.tar

In order to make a link open in a separate window, you have to go to the classes/XLite/Module/Tony/CMSLinksAdjustment/CDev/SimpleCMS/View/Menu/Customer/FooterMenu.php file and add the name of the link into the $linksInSeparateWindows variable.

The module contains three files except Main.php:
- CDev/SimpleCMS/View/Menu/Customer/FooterMenu.php class is for walking through each menu entity and adding 'aboutBlank' to certain menu items
- View/Menu/Customer/Footer.php is for overriding default template of footer area
- skins/default/en/modules/Tony/CMSLinksAdjustment/footer_menu.tpl is a new template that will consider 'aboutBlank' attribute of menu entity.

Finally, as about adding this functionality to core, just registered it in our internal TODO list.

Please, let me know if there are any questions about this mod.
__________________
Belinda Karls-Nace
Blue Ribbon Designs
X-Cart Business 5.2.5
Reply With Quote
  #18  
Old 10-30-2014, 02:59 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Pop new window

Hi Belinda!

This module works for Footer menu only. If you need it to work for Top menu as well, you need to re-apply the change. It should not be hard though.

You need to copy files:
CDev/SimpleCMS/View/Menu/Customer/FooterMenu.php
View/Menu/Customer/Footer.php

to

CDev/SimpleCMS/View/Menu/Customer/PrimaryMenu.php
View/Menu/Customer/Top.php

In this files, you need to adjust namespaces and specify that you are decorating the \XLite\View\Menu\Customer\Top class instead of \XLite\View\Menu\Customer\Footer one.

Finally, you need to change method in the View/Menu/Customer/Top.php file to be:

Code:
protected function getDefaultTemplate() { return 'modules/Tony/CMSLinksAdjustment/top_menu.tpl'; }

and then create your top_menu.tpl file.

Now it might sound as a rocket science, but these three steps are quite easy and I feel you can apply them yourself. Surely, I will be able to guide you step-by-step in this task.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #19  
Old 05-19-2015, 04:42 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Pop new window

Here is a version of the mod for 5.2 core:
https://dl.dropboxusercontent.com/u/23858825/Tony-CMSLinksAdjustment-v5_2_0.tar
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote

The following user thanks tony_sologubov for this useful post:
BRDgirl (05-19-2015)
  #20  
Old 05-19-2015, 09:13 AM
 
BRDgirl BRDgirl is offline
 

Advanced Member
  
Join Date: Feb 2014
Posts: 33
 

Default Re: Pop new window

Thanks so much for updating this Tony - it worked perfectly! I appreciate you.
__________________
Belinda Karls-Nace
Blue Ribbon Designs
X-Cart Business 5.2.5
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:24 PM.

   

 
X-Cart forums © 2001-2020