Wednesday, January 07, 2009 | Register | Login 
Minimize
 Module Support Forums
 
 Forum Forum metaPost Forums metaPost Forums Providers - Ven... Providers - Ven... Removing the Bookmark Feature Removing the Bookmark Feature
Previous Previous
 
Next Next
New Post
 6/14/2008 7:53 AM
vollerworld
11 posts
No Ranking


Removing the Bookmark Feature
 

Hi Don!  Still loving the product, can't say enough good things about it.

Issue:  Most of the sites I use Metapost on are customized for the end user with the News Articles module from Ventrian.  One of the things I do is customize templates and remove the "Read More" functionality.  This prevents visitors from having to "drill down" into the blog articles for reading.

Consequently, there is only 1 main page for most of my bloggers.  With metapostCE, a javascript Bookmark button is placed into each post.  Net result = every blog article has a bookmark button that all link to exactly the same page!  ;-)  This presents a bit of obvious redundancy for me, and I was wondering if there is a way this can be removed from the code or just not included by default?

I like the bookmark button's functionality, but I'd like to be able to control that myself.

Thanks again!
- Chad

 
New Post
 6/15/2008 12:48 AM
Don Worthley
201 posts
9th Level Poster


Re: Removing the Bookmark Feature
 

Hi Chad,

Thanks for the kind words and for being such a great proponent of metaPost.  I really appreciate it.

There are a couple of ways to work around this issue.  One is to modify the mg.js file to look more like the m.js file which was designed for the blog module and which contains code to check to see if the URL contains an EntryId in the QueryString.  If not, then the add this bookmark isn't shown.  But, for many this will be too complicated since it will require an understanding of JavaScript and the ability to modify the custom JavaScript files.

A better solution for the News Articles module is this:

Change the template for the Listing.Item.Html by wrapping the actual item in a div with a class set to something like nalisting.  Here's how the center part of my template looked after making this change:

              <td class="articleTextCell">
               <div class="nalisting"><span class="Normal">[SUMMARY]</span></div>
              </td>

Next, log in as an admin and add the following style to your skin's stylesheet:

.nalisting .d_itc_f {display:none;}

d_itc_f is the class assigned to the footer div and this CSS tells the browser to hide the entire footer div when shown inside an nalisting class (which you used to wrap listing content through your modification to the NA templates above).

HTH and thanks again for using metaPost!

Don

 
Previous Previous
 
Next Next
 Forum Forum metaPost Forums metaPost Forums Providers - Ven... Providers - Ven... Removing the Bookmark Feature Removing the Bookmark Feature
 Print