A card module consisting of two sides, an image and a heading and paragraph on the other side.
  • PHP 77.8%
  • CSS 22.2%
Find a file
2020-02-14 18:37:32 +01:00
css Added first version. 2019-08-10 14:23:51 +02:00
doc Updated README.md 2019-08-10 16:54:21 +02:00
etc Added first version. 2019-08-10 14:23:51 +02:00
module.php Bugfixes, Updated to the new API. 2020-02-14 18:37:32 +01:00
README.md Updated README.md 2019-08-10 16:54:21 +02:00

Lewp module "vita"

Description

A card module consisting of two sides, an image and a heading and paragraph on the other side.

Installation

In the terminal, go either to the global module or site module level of your hierarchy. Then invoke the following command.

git clone git@gitlab.com:lewp/modules-cards-vita.git modules/cards/vita

Configuration

The module loads json files that are stored in its resources/json folder. In this folder, the content is splitted by page ids. The files are named by the execution_count variables that is passed in the options variable. For example cards that are displayed on the page with id "about-me" are stored in the following way:

resources/json/1.json
resources/json/2.json
resources/json/3.json

The .json files are set up like this:

{
    "landscape_id": "my-landscape-image-id.jpg",
    "portrait_id": "my-portrait-image-id.jpg",
    "module_id": "the-module-id-where-the-images-are-stored",
    "heading": "Another nice card",
    "slogan": "Create as many cards as you like!"
}

In your page file, add the following command to add the module to your page.

$this->addModule("cards_vita");

Example

Example setup for vita