Download the PHP package nystudio107/recipe without Composer

On this page you can find all versions of the php package nystudio107/recipe. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package recipe

No Maintenance Intended

DEPRECATED

This Craft CMS 2.x plugin is no longer supported, but it is fully functional, and you may continue to use it as you see fit. The license also allows you to fork it and make changes as needed for legacy support reasons.

The Craft CMS 3.x version of this plugin can be found here: craft-recipe and can also be installed via the Craft Plugin Store in the Craft CP.

Recipe plugin for Craft CMS

A recipe FieldType for Craft CMS that includes microdata support

Related: Recipe for Craft 3.x

Installation

To install Recipe, follow these steps:

  1. Download & unzip the file and place the recipe directory into your craft/plugins directory
  2. -OR- do a git clone https://github.com/nystudio107/recipe.git directly into your craft/plugins folder. You can then update it with git pull
  3. -OR- install with Composer via composer require nystudio107/recipe
  4. Install plugin in the Craft Control Panel under Settings > Plugins
  5. The plugin folder should be named recipe for Craft to see it. GitHub recently started appending -master (the branch name) to the name of the folder for zip file downloads.

Recipe works on Craft 2.4.x, Craft 2.5.x, and Craft 2.6.x.

Recipe Overview

Recipe adds a 'Recipe' FieldType for Craft CMS that you can add to any of your Sections.

In encapsulates everything you need for a recipe, including the ingredients, a photo of the recipe, directions, cooking time, ratings, and even nutritional information. It handles converting between Imperial and Metric units, outputs 'pretty' fractions for Imperial units, and can output correct ingredient portions for any number of servings.

Recipe also generates the JSON-LD microdata for your recipes if you have the SEOmatic plugin installed, which allows it to be displayed in the Google knowledge panel for search results.

We hope Recipe makes it easier for you to create and share some yummy recipes!

Configuring Recipe

Create a Recipe field via Settings->Fields and you can set the Asset Sources that are used for the recipe images

Using Recipe

Once you have created the Recipe field, add it to your Section Entry Types, and fill in what recipe information is appropriate. Nothing other than the name is required, so feel free to leave anything blank that you're not using.

Using Recipe in your Templates

To display information about a recipe in your templates, you just use familiar Twig code. Let's assume the field handle for your Recipe field is someRecipe; this is what you'd use to output information about it:

Basic Info

Ingredients

For a list of ingredients, do the following (adding whatever output markup you want):

{% set ingredients = entry.someRecipe.getIngredients('imperial', 1) %}
{% for ingredient in ingredients %}
    {{ ingredient }}
{% endfor %}

The first parameter is the units you'd like to use ('imperial' or 'metric'). The second parameter is how many people you'd like the recipe portions to be sized for. By default, it will use 'imperial' and the serving size in the recipe if you don't pass these parameters in, e.g.: entry.someRecipe.getIngredients()

Directions

For a list of directions, do the following (adding whatever output markup you want):

{% set directions = entry.someRecipe.getDirections() %}
{% for direction in directions %}
    {{ direction }}
{% endfor %}

Ratings

For a list of the ratings, do the following (adding whatever output markup you want):

{% set ratings = entry.someRecipe.ratings %}
{% for rating in ratings %}
    {{ rating.rating }} {{ rating.review }} {{ rating.author }}
{% endfor %}

For the aggregate (average) rating for this recipe, do the following (adding whatever output markup you want):

{{ entry.someRecipe.getAggregateRating() }}

Nutritional Information

To output the nutritional information for the recipe, do the following:

Image Asset ID

If you need to do any further manipulation of the Recipe Image (perhaps a transform) you can get the Asset ID for it:

Rendering Recipe JSON-LD Microdata

If you have the SEOmatic plugin installed, Recipe can render JSON-LD microdata for you, which allows it to be displayed in the Google knowledge panel for search results:

{{ entry.someRecipe.renderRecipeJSONLD() }}

Recipe Roadmap

Some things to do, and ideas for potential features:

Recipe Changelog

1.0.3 -- 2017.01.05

1.0.2 -- 2016.09.18

1.0.1 -- 2016.05.01

1.0.0 -- 2016.05.01

Brought to you by nystudio107


All versions of recipe with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nystudio107/recipe contains the following files

Loading the files please wait ....