Download the PHP package flokosiol/viewmode without Composer

On this page you can find all versions of the php package flokosiol/viewmode. 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 viewmode

Kirby View Mode

Version License Kirby

With this plugin for Kirby CMS you can display pages in different view modes. If you like to know mor eabout this concept please check out this article on my website.

⚙️ Requirements

💰 Commercial Usage

This plugin is free but if you use it in a commercial project please consider to make a donation.

🛠️ Installation

Composer

It is recommended to install the plugin via Composer:

Download

Alternatively you can download and extract this repository, rename the folder to viewmode and drop it into the plugins folder of your Kirby installation. You should end up with a folder structure like this:

Git Submodule

If you prefer git submodules, this ist your command:

🧑‍💻 Usage

1. View Mode Templates

This plugin is based on content representations. If you want to add a view mode to one of your page types you need to add a template to your templates folder like you do for content representations:

The dafault template for the page type should already exists next to it.

Inside your view mode template you can add the template code you want to use for the page when it's rendered in this particular view mode – just like you do in a normale page template or a snippet.

Like every other content representation you can make use of controllers to simplify your template code.

2. Using the view mode

To render a page in the declared view mode add this to your template code …

3. Route Blocking (optional)

The view modes (a.k.a. content representations) are by design accessible via their URL. This is intended! Otherwise content representions wouldn't make any sense. But since we use it for a different purpose, we might want to block these pages. If the regular page e.g. is https://mydomain.com/articles/my-latest-article a view mode teaser would be accessible via https://mydomain.com/articles/my-latest-article.teaser.

To block all URLs for the teaser view mode, add this to your config.php. This blocks all URLs of your whole website which ends on .teaser. Make sure to double check these settings. Otherwise you might block some pages by mistake. If you notice that strange error pages appear on your website, this would be the first place to look :)

⚠️ Handle with care!

📋 License

MIT

It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.


All versions of viewmode with dependencies

PHP Build Version
Package Version
Requires getkirby/cms Version ^4.0 || ^5.0
getkirby/composer-installer Version ^1.1
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 flokosiol/viewmode contains the following files

Loading the files please wait ....