I am developing a share site dashlet and I want to know how can I refer to the current site to get all the documents from its document library? I am even if any one can suggest how to point to current site in the webscript for share site dashlet?
Take a look at the source for the site dashlets - you will see a common pattern, the siteid is provided in the "args" to the webscript. You can access it both within your web-tier javascript controller or the freemarker presentation template: