Download the PHP package dorsetdigital/silverstripe-simpleinstagram without Composer
On this page you can find all versions of the php package dorsetdigital/silverstripe-simpleinstagram. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dorsetdigital/silverstripe-simpleinstagram
More information about dorsetdigital/silverstripe-simpleinstagram
Files in dorsetdigital/silverstripe-simpleinstagram
Package silverstripe-simpleinstagram
Short Description Retrieves the Instagram feed for a given user for embedding in a template
License BSD-3-Clause
Informations about the package silverstripe-simpleinstagram
silverstripe-simpleinstagram
Retrieves the Instagram feed for a given user for embedding in a SilverStripe template
This module is a simple wrapper for the Instagram user feed PHP library
Requirements
- Silverstripe 4.x
- pgrimaud/instagram-user-feed 5.x
Installation
- Install the code with
composer require dorsetdigital/silverstripe-simpleinstagram
- Run a
dev/build?flush
to update your project
Usage
To use the module, you will need to add a couple of bits of code to your template and its associated model. The Instagram username is passed in as the (required) argument when instantiating the class. For example, if you were adding a feed to your HomePage class for the 'natgeo' Instagram account:
and then in your HomePage.ss file you would use the following syntax to display the data:
The markup shown above is purely for example purposes. You can format / style it any way you want to suit your project.
Performance
In order to help reduce the dependency on the external service and to improve efficiency, the module supports caching via the standard SilverStripe mechanisms. Caching is disabled by default, but it can be enabled by adding a yml configuration to your project, eg:
Enable the cache by setting enable_cache
to true
. Set the cache time (in seconds) with cache_time