Topic
  • 8 replies
  • Latest Post - ‏2010-05-25T06:50:54Z by Corretgé
Corretgé
Corretgé
4 Posts

Pinned topic How to add entry title in the TITLE tag of a blog

‏2010-05-05T11:12:48Z |
Hi, I added a Facebook Like button on my blog EspecialistAS400 after every entry.
 
When I view a unique entry I need to set the TITLE tag with some info about this entry, to show it in the facebook profile. Now only shows the blog name.
 
When the _header template is processed $entries is empty. 
 
Whell I try to use the URL, is descriptive, but I don't know how to retrieve it. 
 
Is there any site with a manual to read about $utils, $url and other variables?
 
thanks! 
Updated on 2010-05-25T06:50:54Z at 2010-05-25T06:50:54Z by Corretgé
  • amidewar
    amidewar
    35 Posts

    Re: How to add entry title in the TITLE tag of a blog

    ‏2010-05-13T12:29:19Z  
     Have you made this modification to your My developerWorks blog or an external blog? 
  • bobleah
    bobleah
    204 Posts

    Re: How to add entry title in the TITLE tag of a blog

    ‏2010-05-19T00:39:29Z  
    • amidewar
    • ‏2010-05-13T12:29:19Z
     Have you made this modification to your My developerWorks blog or an external blog? 
     Hi Corretgé,
     
    I was playing around with this exact FB widget myself a few weeks back.  As you noted, the standard widget requires the webpage URL as a parm.  I'm not aware of any documentation on the Lotus blog template variables or their usage, but I'm looking for this myself, and will post a link or the doc when I find it. 
     
    I also see where FB offers this widget from the FB Javascript library, and it resolves the URL for you, which is nice.  I'm going to look at what it takes to make the FB Javascript library trusted here on My dW.  Stay tuned!
  • Corretgé
    Corretgé
    4 Posts

    Re: How to add entry title in the TITLE tag of a blog

    ‏2010-05-19T08:33:18Z  
    • amidewar
    • ‏2010-05-13T12:29:19Z
     Have you made this modification to your My developerWorks blog or an external blog? 
    Hi Ami, It's for a My dW blog http://especialistas400.com/ redirect to it. 
     
    Hi Bob, the widget runs fine (it's an iframe and I get the URL with $url.entry($entry.anchor)), but when you click the Like button in the facebook wall appears only the blog's title, not the post's title.
     
    This is because the title tag has only the blog title and when the header is formated, My dW hasn't information about the posts to print.
     
    I accept this limitation, but when compose _headers template, the URL it's known and for my purpose, show differences between liked posts, it's enough.
     
     The million dollars questions is: what is the variable has this value? 
     
     
  • bobleah
    bobleah
    204 Posts

    Re: How to add entry title in the TITLE tag of a blog

    ‏2010-05-22T21:24:14Z  
    • Corretgé
    • ‏2010-05-19T08:33:18Z
    Hi Ami, It's for a My dW blog http://especialistas400.com/ redirect to it. 
     
    Hi Bob, the widget runs fine (it's an iframe and I get the URL with $url.entry($entry.anchor)), but when you click the Like button in the facebook wall appears only the blog's title, not the post's title.
     
    This is because the title tag has only the blog title and when the header is formated, My dW hasn't information about the posts to print.
     
    I accept this limitation, but when compose _headers template, the URL it's known and for my purpose, show differences between liked posts, it's enough.
     
     The million dollars questions is: what is the variable has this value? 
     
     
     Ha!  You got further than I did, as I could not get the iFrame Like widget to anchor anything but the base URL of my blog (not the blog entry URL which is what I desired).
     
    I'm going to send this message board thread to Jay, our in house blog expert, to see if he knows the variable... 
  • JayAllen
    JayAllen
    23 Posts

    Re: How to add entry title in the TITLE tag of a blog

    ‏2010-05-24T19:00:24Z  
    • bobleah
    • ‏2010-05-22T21:24:14Z
     Ha!  You got further than I did, as I could not get the iFrame Like widget to anchor anything but the base URL of my blog (not the blog entry URL which is what I desired).
     
    I'm going to send this message board thread to Jay, our in house blog expert, to see if he knows the variable... 
     Hey guys,
     
    Just want to let you know I'm working on it and will let you know...

    Jay
  • JayAllen
    JayAllen
    23 Posts

    Re: How to add entry title in the TITLE tag of a blog

    ‏2010-05-24T20:47:14Z  
    • Corretgé
    • ‏2010-05-19T08:33:18Z
    Hi Ami, It's for a My dW blog http://especialistas400.com/ redirect to it. 
     
    Hi Bob, the widget runs fine (it's an iframe and I get the URL with $url.entry($entry.anchor)), but when you click the Like button in the facebook wall appears only the blog's title, not the post's title.
     
    This is because the title tag has only the blog title and when the header is formated, My dW hasn't information about the posts to print.
     
    I accept this limitation, but when compose _headers template, the URL it's known and for my purpose, show differences between liked posts, it's enough.
     
     The million dollars questions is: what is the variable has this value? 
     
     
     Alright, the solution is to add the following right before the facebook <div> : 

    <meta property="og:title" content="$entry.title"/>
     
    I've tried it on my blog and it works for both the entry list and individual entry page.  We won't win any HTML style points for putting meta tags throughout a page but it works.

    Jay
  • bobleah
    bobleah
    204 Posts

    Re: How to add entry title in the TITLE tag of a blog

    ‏2010-05-24T23:18:47Z  
    • JayAllen
    • ‏2010-05-24T20:47:14Z
     Alright, the solution is to add the following right before the facebook <div> : 

    <meta property="og:title" content="$entry.title"/>
     
    I've tried it on my blog and it works for both the entry list and individual entry page.  We won't win any HTML style points for putting meta tags throughout a page but it works.

    Jay
     THANKS Jay!
  • Corretgé
    Corretgé
    4 Posts

    Re: How to add entry title in the TITLE tag of a blog

    ‏2010-05-25T06:50:54Z  
    • JayAllen
    • ‏2010-05-24T20:47:14Z
     Alright, the solution is to add the following right before the facebook <div> : 

    <meta property="og:title" content="$entry.title"/>
     
    I've tried it on my blog and it works for both the entry list and individual entry page.  We won't win any HTML style points for putting meta tags throughout a page but it works.

    Jay
    Hi Jay, a lot of thanks for this workarround.
     
    Well, you can't win HTML w3c points, but you win a lot of  World Wide Wit points ;-)
     
    Thanks.