Unique code for contents

This module allows you to add unique codes for contents. It may be used to retrieve contents with codes instead of IDs.

Installation

Manually

  • Copy the module into <thelia_root>/local/modules/ directory and be sure that the name of the module is ContentCode.
  • Activate it in your thelia administration panel

Composer

Execute this in a terminal, in your thelia directory:

$ composer require thelia/content-code-module:~1.2

or add it in your main thelia composer.json file

"require": {
 "thelia/content-code-module": "~1.2"
}

Usage

After having activate the module, go to your content's "module" tab, type your code and click submit.

Hook

This module uses the content.tab-content hook to add the code form.

Loop

[content-code]

Input arguments

ArgumentDescription
id The content_code ID
content_id The content ID
code The content code
order The order to retrieve the content codes. Values: id, id-reverse, content_id, content_id-reverse, code, code-reverse

Output arguments

VariableDescription
$ID The content_code ID
$CONTENT_ID The content ID
$CODE The content code

Exemple

{loop type="content-code" name="content-code" code="foo"}
    {loop type="content" name="content" id=$CONTENT_ID}
        ...
    {/loop}
{/loop}

[content-extend-content-code]

Extends the Thelia loop : Content

Other input arguments

ArgumentDescription
code The content code

Exemple

{loop type="content-extend-content-code" name="content-extend-content-code" code="foo"}
    ...
{/loop}
Download
Download

Unique code for contents

This module allows you to add unique codes for contents. It may be used to retrieve contents with codes instead of IDs.

Compatibility :

Thelia 2.2

Compatibility :

Thelia 2.3

Say Hi & Get in Touch

info@thelia.net - +33(0)4 44 05 31 00

Thelia Network English
E-commerce solution

E-commerce software, useful to create and manage online stores, published under a free license. Discover our new version, based on many modern technologies !

Download Thelia
Business

A team of experts at your service.

Showcase

Over 7000 online stores powered by Thelia

Modules

Customize your Thelia.

Openstudio

Thelia editor