I'm trying to use the Modal Frame API with some success but I've come across a detail that I find strange in the child.js file, line 100, in the 'Drupal.modalFrameChild.behaviors.parseLinks' function where URLs are processed to change their target attribute to '_new' if they are external.
but this function also sets to '_new' the attributes of the internal links I display via my module when it could be very useful to include the possibility to change this to '_parent'.
And using the 'modalframe-exclude' class sets them to '_self'.
Although I'm way a noob in module development maybe adding the possibility to use a new css class would extend this :

if ($(this).hasClass('modalframe-parentlink')) {
       $(this).attr('target', '_parent');
    }

could someone explain to me if I'm missing something or if my code would be useful at all?

++

Comments

markus_petrux’s picture

Category: feature » support
Status: Active » Fixed

You can load a custom javascript file that implements a Drupal behavior that parses the links on the page and alter their attributes to suit your needs.

lizuka’s picture

Yes indeed, thanks for your help.
a simple behavior after the main modal frame function works perfectly.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.