Option to open Page Link in a new window

greg.harvey - February 11, 2009 - 14:14
Project:Legal
Version:6.x-2.2-beta4
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

This is similar to the following post for D5:
http://drupal.org/node/332567

Except my patch (attached) makes this an option. It creates an additional variable (I also clean this up in hook_uninstall) that allows users who have selected the Page Link display option in admin to optionally check a box to make this link open in a new window. It was either this, or move the link to a template file using a hook_theme implementation. I figured the admin option was better for most users.

Please review. This is probably a better candidate for back-port to D5 than the other patch, which *imposes* the new window behaviour on all comers... Thanks! =)

Ps - I had to add form weights for admin, as the checkbox was appearing in an odd place.

AttachmentSize
legal-page-link-new-page.patch3.6 KB

#1

vmenelas - February 18, 2009 - 01:54

How do you add this to your legal module?

#2

greg.harvey - February 18, 2009 - 10:50

You read this section of Drupal.org and follow the instructions: http://drupal.org/node/60108

;-)

#3

vmenelas - February 22, 2009 - 01:09

I am still a little bit confused...do I save the file, if so what do I save it as?
Thank you

#4

RG - March 27, 2009 - 14:35

Hello,
Valery, if you want to patch your module, you have to save the patch in the good directory (here, the "Legal" module directory).

Then you navigate through the "cd" command to the good directory (i.e. "cd www/mywebsite/sites/all/modules/legal"), and you apply the patch.
To do this you have to type : "patch [-b] < your_patch_file.patch".

(the "-b" option creates a copy of your file before modifying it, can be useful).

#5

Eugene Dubois - April 12, 2009 - 21:14

Is there a way create a pop-up window with only the terms and conditions?

Menu's etc. should not be there...

#6

greg.harvey - April 13, 2009 - 07:07

Actually, thinking about it, an AJAX option would be nice! =)

#7

foodbo - May 23, 2009 - 02:44

is it possible to integrate the "popup api" module with the legal module?? instead a new window but just "overlay".

I am quite new this drupal thing, and trying to read the readme.txt from popup api module, and seems shouldn't be hard to integrate them both ?? for the experience users, but just no clue what it is saying there.

would be appreciated if u can point me to the right direction.

#8

Robert Castelo - May 23, 2009 - 21:27

foodbo good idea!

I've been wanting to add a Lightbox style effect rather than link to another page, and this looks like an easy way to do it.

I don't have time to do it at the moment, but it's high on my To Do list.

 
 

Drupal is a registered trademark of Dries Buytaert.