Silverstripe module to load Tumblr feeds via Tumblr API V2
$ composer require tkiehne/silverstripe-tumblrfeed
mysite/_config/config.yml
to extend the object of your choice: Page:
extensions:
- TumblrPageExtension
or set the following call in mysite/_config.php
:
Page::add_extension('TumblrPageExtension');
/dev/build/?flush=1
<% include TumblrPosts Posts=$TumblrPostsList %>
TumblrPostsList($limit, $offset, $type, $options)
TumblrTextPostsList($limit, $offset, $tag, $text)
TumblrQuotePostsList($limit, $offset, $tag, $text)
TumblrLinkPostsList($limit, $offset, $tag, $text)
TumblrAnswerPostsList($limit, $offset, $tag, $text)
TumblrVideoPostsList($limit, $offset, $tag, $text)
TumblrAudioPostsList($limit, $offset, $tag, $text)
TumblrPhotoPostsList($limit, $offset, $tag, $text)
TumblrChatPostsList($limit, $offset, $tag, $text)
TumblrPost($id, $text)
By default, the TumblrPosts.ss
include will call subsequent includes depending on post type. To customize the list container, override or create a copy of TumblrPosts
. To customize the way that posts are displayed within the container, override the respective Tumblr[TYPE]Post.ss
or, if you've customized the container, create your own include.
Include variables follow the syntax and structure of the Tumblr API, based on the "posts" collection of the response. See the module's default includes for examples and be aware of template context.
This module uses SS_Cache to reduce the amount of API requests. Default cache lifetime is 30 minutes.
You can change this value by putting this line in your _config.php
(1800 is cache lifetime in seconds):
SS_Cache::set_cache_lifetime('tumblr_api_cache', 1800, 10);
Uses the official Tumblr API v2 PHP Client
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem