thelia / selection-module
Installs: 1 705
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 12
Open Issues: 4
Type:thelia-module
Requires
- thelia/installer: ~1.1
README
This module allows you to create a selection of products or contents of similar themes (Best sellers, Best rated by women, .. for example). The selection will then be displayed as list of those products or contents.
Compatibility
- To use this module on Thelia 2.3.x, use the tag 1.1.9
Installation
Manually
- Copy the module into
<thelia_root>/local/modules/
directory and be sure that the name of the module is Selection. - Activate it in your thelia administration panel
Composer
Add it in your main thelia composer.json file
composer require thelia/selection-module:~1.1.11
Usage
Once activated, a new button called "Selection" will appear in the tool menu on the left sidebar of the admin panel. Clicking on it will redirect you to the list of all the selections you've created so far.
Once on the page with all your selections you may :
- Create a new selection by clicking on the + button at the top right of the page.
- Toggle the visibility of your selection (whether people will see it or not) by clicking on the "Online" button in front of the selection you wish to make visible or invisible.
- Edit an already created selection by clicking on its name or on the cog button then on the pencil button in front of the selection you wish to edit.
- Delete a selection by clicking on the cog button then on the trash button in front of the selection you wish to delete.
You may then display your selection on your website by calling the selection_list loop.
Hook
This module has a single hook in the back office, adding the Selection button to the tools menu of the sidebar on the left, redirecting to the list of selection.
Loop
[selection_list]
This loop returns a list of selections. You can use it to display the selections you've created in your website.
Input arguments
Output arguments
Exemple
{loop name="selection_list" type="selection_list" visible=true id='1,4'}
This selection id : {$SELECTION_ID}
This selection title : {$SELECTION_TITLE}
This selection code : {$SELECTION_CODE}
This selection status : {$SELECTION_VISIBLE}
This selection description : {$SELECTION_DESCRIPTION}
This selection chapo : {$SELECTION_CHAPO}
This selection url : {$SELECTION_URL}
This selection postscriptum : {$SELECTION_POSTSCRIPTUM}
This selection position : {$SELECTION_POSITION}
{/loop}
[selection_image]
This loop returns the images related to a selection.
Input arguments
Input Arguments are extended by Thelia\Core\Templates\Loop\Image
Output arguments
Output Arguments are extended by Thelia\Core\Templates\Loop\Image
Exemple
{loop type="selection_image" name="selection_image" source="selection" source_id=$SELECTION_ID limit="1" visible="true"}
{/loop}
[selection_container]
This loop returns a list of selections containers. You can use it to display the selections containers you've created in your website.
Input arguments
Output arguments
Exemple
{loop name="selection_container" type="selection_container" visible="*" backend_context="1" lang=$lang_id order=$selection_container_order}
{$SELECTION_CONTAINER_ID}<br>
{loop type="selection_image" name="selection_image" lang="$edit_language_id" source="selection" source_id=$SELECTION_CONTAINER_ID width="70" height="50" resize_mode="borders" limit="1" visible="true"}
<img class="img-thumbnail" src="{$IMAGE_URL nofilter}" href="{url path="admin/selection/container/update/%selectionContainerId" selectionContainerId=$SELECTION_CONTAINER_ID}">
{/loop}
{{$SELECTION_CONTAINER_ID}}<br>
{$SELECTION_CONTAINER_TITLE}<br>
{$SELECTION_CONTAINER_POSITION}<br>
{/loop}