Add class to link

Home Forums MapPress Support Add class to link

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12700
    sobefx
    Participant

      Hi Chris, I too wanna thank you for this wonderful plugin! I did a lot of research for my project & your solution was simply the best, worth every dime! =)

      So,, since the last update (dont know if this is new or if I just missed it before) I found the feature “Link POI titles to the underlying post” which links just perfectly to its underlying wordpress post; what Im looking for is: from the category list, my posts open in Thickbox (Lightbox style) and Im trying to achieve the same from the POI – simply assigning class=”thickbox” would do the trick here. I tried to do this in map_poi

      <div class=’mapp-links’>
      <?php echo $poi->get_links(array(‘class’ => ‘thickbox’)); ?>
      </div>

      but that didn’t do…. can you help? =)

      #12710
      Chris
      Keymaster

        Hi,

        I’m assuming you want class ‘thickbox’ added to the link that appears in the infoWindow around the title, when you open a marker?

        If so you can copy the code from get_title_link and modify it (it doesn’t accept ‘class’ as an argument unfortunately).

        In map_poi.php:`

        map();
        $link = ($poi->postid) ? $map->options->mashupLink : false;
        echo ($link) ? “postid) . “'>$poi->title” : $poi->title;
        ?>

        `

        #12712
        sobefx
        Participant

          Hi Chris, thx for reply!

          No not from the InfoWindow – my fault, I guess I blamed the wrong option for what I want:

          by clicking the POI, the icon on the map, I want to open its post (no POI body) & it does, choosing: Mashup POI click –> Go directly to the post; But I don’t want to load a new page, I just want to open the post in an overlay, over the map; I made this work for my wp category list (that I use instead of your POI-list), just from the map it keeps loading in a new page… and I couldn’t figure out where to attach the class.

          hope thats more clear this time, engl is not my 1st language…
          thx!

          #12713
          Chris
          Keymaster

            Hi,

            I’m sorry, but I don’t think that’s possible. When you click the marker, it’s not like clicking an anchor link – it actually redirects the browser URL directly to the new post. So there’s no way to apply a ‘class’ the way you would with a link.

            I think you’ll need to let the marker open first, to display the link, as in the code I listed earlier.

            #12720
            sobefx
            Participant

              Ok, I went for the second best option then…

              it didn’t work in map_poi though, but since I applied your code to mappress_poi, it works like a charm! =)

              thank you so much for your help!

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.