We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2690
    • 148 Posts
    Hello,

    Can anybody help me with advise on how to add google analytics code in the large image popup.
    i guess i have to modify popup.js, but i’m not sure if you can call jS within the JS.

    Is there any way to have a template for popup windows? i have 1000s of pages and creating separate pages with &isTarget is not an option.


    Thank you!
    Aleks
      MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
      • 7923
      • 4,213 Posts
      Yes, you can have template in the popup, see this example:
      http://wiki.modxcms.com/index.php/MaxiGallery#Open_popup_with_prev.2Fnext_links


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 2690
        • 148 Posts
        it doesnt really work as i planned. i have the following structure of gallery pages:

        thumbnail page -> main image page -> large image popup

        so what i’m trying to achieve is to template the last part: ’large image popup’
        if i follow the instructions and put the ’&picture_target=`docid`’ in the main thumbnails call it skips the ’main image page’


        thanks,

        Aleks
          MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
          • 7923
          • 4,213 Posts
          Do a custom pictureTpl where you open some modx document for the large image popup and pass maxigallery picture id through the querystring, eg

          <a href=`[~mydoc~]?pic=[+maxigallery.picture.id+]`><img....

          Then in that modx document, have a maxigallery call:

          [!MaxiGallery? &display=`pictureview` &pictureTpl=`somechunk`!]

          Then do another custom pictureTpl "somechunk" and in that, make it show the big picture instead of the normal one, eg. put "big_" in front of every [+maxigallery.picture.filename+] placeholder.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."