Sharing Posts from Custom page


I am running Ghost v2.0 in my local machine.

I have a custom page called news.hbs where I have listed the posts using collections in routes.yaml as follows,

    permalink: /news/{slug}/
    template: news
    filter: tag:-[slideshow]

From here I have to share posts to twitter.

<a class="floating-header-share-tw" title="Share to Twitter" href="{{encode title}}&amp;url={{url absolute="true"}}" onclick=", 'share-twitter', 'width=550,height=235');return false;">
            {{> "icons/twitter"}}

But the result is as follows,


I need the post url and the post title as follows,

Getting Started!!! http://localhost:2368/news/welcome/

but it is getting

[object Object] http://localhost:2368/news/

This is working fine in the post detailed page (post.hbs) but I want to integrate this in the post listing page (news.hbs).

closed #2

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.