Download the PHP package keyteq/cloudinary-metaindexer without Composer
On this page you can find all versions of the php package keyteq/cloudinary-metaindexer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download keyteq/cloudinary-metaindexer
More information about keyteq/cloudinary-metaindexer
Files in keyteq/cloudinary-metaindexer
Package cloudinary-metaindexer
Short Description Indexes cloudinary account to a mongodb database, and makes it available to list items in the frontend based on selected tags.
License GPL-2.0
Homepage https://github.com/keyteq/cloudinary-metaindexer
Informations about the package cloudinary-metaindexer
cloudinary-metaindexer
Indexes cloudinary account to a mongodb database, and makes it available to list items in the frontend based on configured tags AND/OR a folder prefix.
This way you can create custom eZ pages that only lists cloudinary resources tagged with certain tags or within a cloudinary folder.
Prerequisites
- eZ Publish 5.4+ or eZ Platform
- PHP 5.5+
- Mongodb installed on the server. And php extension for mongodb installed.
- A cloudinary account.
- A cron job (see doc below)
INSTALL
Step 1
If you are running PHP 5.6+ / 7+ you don't have the old ext-mongo
installed. Doctrine ODM 1.X requires ext-mongo
, but there is a adapter available for this case.
You need to install this adapter for mongodb (PHP 5.6+ / 7+):
Note: If you have PHP version less then PHP 5.6 - skip this step.
Step 2
Install this bundle (stable):
Step 3 - (if you have doctrine mongodb installed from before)
If you have configured doctrine mongodb in your project for some other tasks you will need to disable the auto mapping for the cloudianry meta indexer bundle. That is ONLY if you have auto_mapping set to true.
Update your config.yml
where doctrine_mongodb
is configured:
CONFIGURE
Add to the app kernel to enable the bundle (app/AppKernel.php
):
Add required configuration (remember to change the database to something unique for your project).
app/config/config.yml:
And update parameters.yml.dist:
Run composer install to add your secret parameters.
Test cloudinary sync
Setup a cron job to run mongodb sync
Setup a new cronjob to run the synchronization job:
NOTE: change app/console to
ezpublish/console` depending on your eZ publish/platform version.
The below cron specification will run this job at 2:30 every night.
Import the cloudinary_page package
See Resources/ezcontentclass/
folder in this bundle, there is a content class that you can import via ez administration ui.
That package includes a new content class named cloudinary_page
and contains some mandatory attributes. You are free to add
your own after you import the content class.
After imported, create a new content object of that specific class.
Extending the template with a pagelayout (required for 5.x of eZ)
Step 1 is required for 5.X of ezpublish.
Step 1
By default, we don't extend any template, so the layout will be empty ( no header and footer ).
- Note: For 5.x use controller
keyteq.cloudinary_meta_indexer.controller.full_view:viewCloudinaryPageLocation
. - Note: If you are using layouts, use "ngcontent_view" instead of content_view.
Create your own override in yourezbundleconfig.yml
:
Customization of controller
Changing default 12 resources per page.
To set 24 resources per page for siteaccess YOUR_FRONT_SITEACCESS
:
parameters.yml:
Step 2
And create a new template for the cloudinary_page: AcmeDemoBundle/Resources/views/full/cloudinary_page.html.twig
:
If you dont want the built in markup you can look inside the KeyteqCloudinaryMetaIndexerBundle:content/full:cloudinary_page.html.twig
template and use certain parts of the template for your needs.
All versions of cloudinary-metaindexer with dependencies
doctrine/orm Version ~2.4
doctrine/mongodb-odm Version ^1.0
cloudinary/cloudinary_php Version ^1.0