定制 thelia/keyword-module 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thelia/keyword-module

最新稳定版本:3.1.1

Composer 安装命令:

composer require thelia/keyword-module

包简介

Associate contents, folders, categories and products to one or more keywords

README 文档

README

This module is used to associate category, product, content or folders to one or more keywords. This allows you for example to display items based on a particular keyword or structure your page with a tag system.

How to install

This module must be into your modules/ directory (thelia/local/modules/).

You can download the .zip file of this module or create a git submodule into your project like this :

cd /path-to-thelia
git submodule add https://github.com/thelia-modules/Keyword.git local/modules/Keyword

Next, go to your Thelia admin panel for module activation.

How to use

You can manage your keywords on the configuration view of the module with the "configure" button on the modules list.

To associate one or more keywords to a content or a folder, go to tab "Modules" of content or folder editing view.

This module allow you to use 6 new loops : keyword_category, keyword_product, keyword_content, keyword_folder, keyword_group and keyword.

Since v3.1.0 you can use classic loops (category, product, content, folder) with the argument "keyword" to filter the results (and keyword_match_mode : exact or partial).

Ex :

{loop name="categories" type="category" keyword="my_keyword" keyword_match_mode="exact"}
    ...
{/loop}

Here is an example of using each :

Use the keyword_category loop (list of categories related to the "my_keyword" keyword)

{loop name="categories" type="keyword_category" keyword="my_keyword" association_order="manual_reverse"}
    ...
{/loop}

Use the keyword_product loop (list of products related to the "my_keyword" keyword)

{loop name="products" type="keyword_product" keyword="my_keyword" association_order="manual_reverse"}
    ...
{/loop}

Use the keyword_content loop (list of contents related to the "my_keyword" keyword)

{loop name="contents" type="keyword_content" keyword="my_keyword" folder="1" association_order="manual_reverse"}
    ...
{/loop}

Use the keyword_folder loop (list of folders related to the "my_keyword" keyword)

{loop name="folders" type="keyword_folder" keyword="my_keyword"}
    ...
{/loop}

Use the keyword_category loop (list of categories related to the "my_keyword" keyword)

{loop name="categories" type="keyword_category" keyword="my_keyword"}
    ...
{/loop}

Use the keyword_product loop (list of products related to the "my_keyword" keyword)

{loop name="products" type="keyword_product" keyword="my_keyword"}
    ...
{/loop}

Use the keyword loop (list all keywords that are visible)

{loop name="keyword_list" type="keyword" visible="*" order="manual" backend_context="1" lang=$lang_id}
    ...
{/loop}

Use the keyword group loop (list all keyword groups that are visible)

{loop name="keyword_group_list" type="keyword_group" visible="*" order="manual" backend_context="1" lang=$lang_id}
    ...
{/loop}

You can also check the association between a keyword and a category, a product, a folder or a content by using Smarty extension available in the latest version of this plugin :

Check if thelia object is associated with keyword "my_keyword"

{category_has_keyword category_id=$ID keyword_code="my_keyword"} {* return true/false if relation exist or not *}
{product_has_keyword product_id=$ID keyword_code="my_keyword"}
{folder_has_keyword folder_id=$ID keyword_code="my_keyword"}
{content_has_keyword content_id=$ID keyword_code="my_keyword"}

统计信息

  • 总下载量: 2.07k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 6
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2015-01-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固