hexplor / grav-plugin-latest-tweets

Display latest tweets from your twitter account on your grav page.
MIT License
6 stars 0 forks source link

Setting up the Plugin #4

Closed juer4886 closed 6 years ago

juer4886 commented 6 years ago

Dear Karol,

I have a very naive question, but I did everything as said in the readme file but nothing shows up in my page. The config file is here, the enable: true is here. I used my handle in the ID with and without capital first letter and the token/keys should be OK.

Should I add something in my blog.md or default.md page so it displays the tweets? Should I copy the template to the antimatter theme?

I'm sure it's something very stupid I forgot but I cannot figure out what.

Sorry for bothering you...

Thank you for this plugin in any case :)

Best,

Julien

hexplor commented 6 years ago

You sure you set it like that ? https://monosnap.com/direct/Qr8QmkgrOZCCWpmz2XYdVekpVUiy4c

juer4886 commented 6 years ago

Dear Karol,

Indeed, everything is set up like this.

I think my issue is in displaying the feeds. Should one use only modular type page? What line of code should I add in the default.md or blog.md file to display the tweets?

Thank you again for your help,

Julien

hexplor commented 6 years ago

Hey, After installing the plugin, just add:

{% include 'partials/latest-tweets.html.twig' %}

to default.html.twig or your other modular template and you should be fine :)

juer4886 commented 6 years ago

Hey,

Damn I must be bad I got this error message :

Server Error

Sorry, something went terribly wrong! 0 - A template that extends another one cannot include contents outside Twig blocks. Did you forget to put the contents inside a {% block %} tag? For further details please review your logs/ folder, or enable displaying of errors in your system configuration.

I added the line you mentionned in the default.html.twig here "grav-admin\user\themes\antimatter\templates" and copied the latest-tweet.html.twig in the "grav-admin\user\themes\antimatter\templates/partials"

Julien

2018-07-13 15:26 GMT+02:00 Karol Orzeł notifications@github.com:

Hey, After installing the plugin, just add:

{% include 'partials/latest-tweets.html.twig' %}

to default.html.twig or your other modular template and you should be fine :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hexplor/grav-plugin-latest-tweets/issues/4#issuecomment-404832879, or mute the thread https://github.com/notifications/unsubscribe-auth/AmbY0ybWbC8FJsqIaA4YCzldKnj4pGksks5uGJ_6gaJpZM4UpXIx .

hexplor commented 6 years ago

Yeah, First of all, you don't need to copy latest-tweets.html.twig if you don't customize it :) Second, Try to put that line of code inside block content :) it can't be outside of the block, otherwise will result in error above :) So add it after:

{% block content %}
hexplor commented 6 years ago

So whole code should be similar to:

{% block content %}
    {{ page.content }}
    {% include 'partials/latest-tweets.html.twig' %}
{% endblock %}
juer4886 commented 6 years ago

Thank you sir it works now :)

And I learned a lot while trying to make it work :)

hexplor commented 6 years ago

Great :) Good luck :)