ShareThis and Monster Menu

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ShareThis and Monster Menu

Mimi T Lai
Hi, Everyone,
My Public Affairs people want to add custom social media buttons, and they want total control over what viewers might see in the title of Facebook sharer, etc. Normally, I might try parsing the page's DOM, but that sounds messy.

Is there a clean and efficient way for me to just return the name of the top Monster Menu link?

For example, on this page, they theoretically want to pick up just "Amherst Today":
https://www.amherst.edu/alumni/learn/amherst_today

<ul class="menu">
     <li class="expanded here">
      <a class="active not-slide" href="/alumni/learn/amherst_today">Amherst Today</a>

(They want to use "Wellesley College and Peking University" rather than just the page title.)

I tried looking through Monster Menu module for clues, but I got a little overwhelmed and would appreciate any tips.

Also, out of curiosity, is anyone else using a social media module that gives you a choice whether to attach certain buttons to certain nodes or mmid?

Gratefully,
Mimi
--
Mimi T. Lai
Web Developer
LIBRARY AND TECHNOLOGY SERVICES
<a href="tel:781.283.3391" value="+17812833391" target="_blank">781.283.3391

---

You are currently subscribed to monster_menus as: [hidden email].

To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=690155

(It may be necessary to cut and paste the above URL if the line is broken)

or send a blank email to [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ShareThis and Monster Menu

McBride, Ian S.
ShareThis implements theme_sharethis($title, $url), which you can override in your template.php file and set the value of $title to something different. You'll have access to arg(1) [the mmtid] and arg(3) [the nid] in that function, so you should have enough context to figure out what title to use.

The return value of theme_sharethis() is the list of buttons to use, so that's also how you'd implement showing different buttons on different nodes.


On Wed, Jun 5, 2013 at 1:45 PM, Mimi T Lai <[hidden email]> wrote:
Hi, Everyone,
My Public Affairs people want to add custom social media buttons, and they want total control over what viewers might see in the title of Facebook sharer, etc. Normally, I might try parsing the page's DOM, but that sounds messy.

Is there a clean and efficient way for me to just return the name of the top Monster Menu link?

For example, on this page, they theoretically want to pick up just "Amherst Today":
https://www.amherst.edu/alumni/learn/amherst_today

<ul class="menu">
     <li class="expanded here">
      <a class="active not-slide" href="/alumni/learn/amherst_today">Amherst Today</a>

(They want to use "Wellesley College and Peking University" rather than just the page title.)

I tried looking through Monster Menu module for clues, but I got a little overwhelmed and would appreciate any tips.

Also, out of curiosity, is anyone else using a social media module that gives you a choice whether to attach certain buttons to certain nodes or mmid?

Gratefully,
Mimi
--
Mimi T. Lai
Web Developer
LIBRARY AND TECHNOLOGY SERVICES
<a href="tel:781.283.3391" value="+17812833391" target="_blank">781.283.3391

---

You are currently subscribed to monster_menus as: [hidden email].

To unsubscribe click here: http://lists.middlebury.edu/u?id=685439.7e7cbccf9bb225cf8471bffe1cb67503&n=T&l=monster_menus&o=690155

(It may be necessary to cut and paste the above URL if the line is broken)

or send a blank email to [hidden email]


---

You are currently subscribed to monster_menus as: [hidden email].

To unsubscribe click here: http://lists.middlebury.edu/u?id=685503.6b071f880fe6a965a128164e6d09ea81&n=T&l=monster_menus&o=690163

(It may be necessary to cut and paste the above URL if the line is broken)

or send a blank email to [hidden email]

Loading...