Download the PHP package jorenvanhee/craft-template-guard without Composer

On this page you can find all versions of the php package jorenvanhee/craft-template-guard. 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 craft-template-guard

Template Guard plugin for Craft CMS 💂

Password protect any page or entry in Craft CMS.

Quick start

Installation

Install the plugin via the plugin store or install manually using composer.

Usage

This plugin provides a protect method in your templates, redirecting users to a login page.

Arguments

Password (string, array)

The password your users need to provide before accessing the page. You can also provide an array of passwords. The page will not be protected when the password is an empty string or array.

Key (string)

Identify a protected area on your site using the key argument. When logged in to a page with a specific key, other pages using the same key will also be accessible.

Examples

Protect a single page

Get started quickly by adding the following code to the template you want to protect.

You can also use a password stored on the entry.

Provide multiple passwords: any of the passwords provided in the array can be used to log in.

Protect multiple pages with the same password

The second argument (key) identifies a protected area on your site. When logged in to a page with a certain key, other pages using the same key will also be accessible.

Add this line to every template you want to protect with that password.

Protect multiple entries each with their own password

Add this line to the template(s) rendering your entries.

â—ī¸ Only templates with this line of code will be protected. Ensure your entry is not split across multiple pages.

Add log out button

â„šī¸ Omit the hidden key input to log out from all template guard instances.

Configuration

Configure Template Guard via Settings → Plugins → Template Guard in the Craft Control Panel.

You can also create a configuration file: config/template-guard.php.

License

This plugin requires a commercial license purchasable through the Craft Plugin Store.


All versions of craft-template-guard with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^4.0.0-beta.3|^5.0.0-beta.2
php Version ^8.0.2
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 jorenvanhee/craft-template-guard contains the following files

Loading the files please wait ....