Hi, I'm customizing the snippets of a Google Custom Search Engine, but I'm having a hard time wondering about the available vars returned by the search. I can't properly render the snippets because I don't know what are the vars. I mean, from google blog, you have this "Vars", which is holding some data, but I don't know what this "Vars" is holding, neither how to print its attributes:
http://googleajaxsearchapi.blogspot.com.es/2010/04/rendering-custom-data-in-custom-search.html <= This is the blog post I'm following <div id="mysite_webResult"> <div class="gs-webResult gs-result" data-vars="{longUrl:function() { var i = unescapedUrl.indexOf(visibleUrl); return i < 1 ? visibleUrl : unescapedUrl.substring(i);}}"> <table> <tr> <td valign="top"> <div data-if="Vars.richSnippet" data-attr="0" data-body="render('thumbnail',richSnippet,{url:unescapedUrl,target:target})"></div> </td> <td valign="top"> <div class="gs-title"> <a class="gs-title" data-attr="{href:unescapedUrl,target:target}" data-body="html(title)"></a> </div> <div class="gs-snippet" data-body="html(content)"></div> <div class="gs-visibleUrl gs-visibleUrl-short" data-body="longUrl()"></div> <div style="& Vars.richSnippet.document"> <img data-attr="{src:Vars.richSnippet.document.filetypeImage}"> By <span data-body="Vars.richSnippet.document.author"></span> - <span data-body="Vars.richSnippet.document.pageCount"></span> pages - <span data-body="Vars.richSnippet.document.viewCount"></span> views - last modified <span data-body="Vars.richSnippet.document.timeAgo"></span> </div> <div data-if="Vars.richSnippet && Vars.richSnippet.action" class="gs-actions" data-body="render('action',richSnippet,{url:unescapedUrl,target:target})"></div> </td> </tr> </table> </div> The above is the code suggested in the blog. As you'll see, there are some "Vars" variables which will show the data. I want to know what this Vars is holding, because I want to show different vCard from the metadata of the pages my project is holding. Can anyone point me out how to do it? Thanks in advance, Fede -- -- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] To view this message on the web, visit https://groups.google.com/d/msgid/google-ajax-search-api/ce505a5a-bda7-43ce-85bb-62e7ba9eb82e%40googlegroups.com?hl=en_US For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
