All Projects → JPathRu → attributes

JPathRu / attributes

Licence: GPL-3.0 license
Компонент реализует дополнительные атрибуты для элементов системы, меню, материалов, категорий, модулей и плагинов.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to attributes

Joomla-Cost-Benefit-Projection
Cost Benefit Projection component for Joomla 3.x
Stars: ✭ 93 (+520%)
Mutual labels:  joomla, joomla-component, joomla-extensions
JCB-Community-Packages
Community Mapped Components for JCB
Stars: ✭ 13 (-13.33%)
Mutual labels:  joomla, joomla-component, joomla-extensions
custom-tables
The Custom Tables extension allows you to create, manage, and display custom data on your Joomla site. It is helpful if you need to display data that is not part of the standard Joomla content structure. For example, you could use this extension to create a custom table for product information, customer data, or any other type of data that you n…
Stars: ✭ 30 (+100%)
Mutual labels:  joomla, joomla-component, joomla-extensions
SWJProjects
Digital projects manager for Joomla! CMS™
Stars: ✭ 16 (+6.67%)
Mutual labels:  joomla, joomla-component, joomla-package
jlsitemap
JL Sitemap - Component sitemap for Joomla
Stars: ✭ 20 (+33.33%)
Mutual labels:  joomla, joomla-component, joomla-extensions
jext-cli
This is a Joomla Component Builder CLI tool for creating a Joomla! 4 component using the terminal.
Stars: ✭ 28 (+86.67%)
Mutual labels:  joomla, joomla-component
joomla
The J!German translation team provides German translation for Joomla!
Stars: ✭ 25 (+66.67%)
Mutual labels:  joomla, joomla-cms
jpath.ru
Для разработчиков и опытных пользователей Joomla! CMS
Stars: ✭ 15 (+0%)
Mutual labels:  joomla, joomla-cms
joomla-bootstrap3-isis-template
Joomla! admin isis template but using Bootstrap 3 styles.
Stars: ✭ 36 (+140%)
Mutual labels:  joomla, joomla-cms
joomla2.x-antispam
Anti-spam plugin for Joomla 2.x
Stars: ✭ 10 (-33.33%)
Mutual labels:  joomla, joomla-cms
JBlank
J!Blank is Joomla CMS blank template for developers
Stars: ✭ 35 (+133.33%)
Mutual labels:  joomla, joomla-cms
astroid-framework
Powerful framework for designers and developers to create responsive, fast & robust Joomla based websites and templates.
Stars: ✭ 26 (+73.33%)
Mutual labels:  joomla, joomla-package
slogin
Social Login for Joomla
Stars: ✭ 24 (+60%)
Mutual labels:  joomla, joomla-component
JD-Builder
JD Builder - Experience the Next Generation of Joomla Page Builder.
Stars: ✭ 21 (+40%)
Mutual labels:  joomla, joomla-component
K2
K2 - the powerful content extension for Joomla
Stars: ✭ 119 (+693.33%)
Mutual labels:  joomla
Icg Autoexploiterbot
Wordpress 🔥 Joomla 🔥 Drupal 🔥 OsCommerce 🔥 Prestashop 🔥 Opencart 🔥
Stars: ✭ 242 (+1513.33%)
Mutual labels:  joomla
Seblod
Build high-end websites with SEBLOD®, a CCK for Joomla!
Stars: ✭ 109 (+626.67%)
Mutual labels:  joomla
Fof
Rapid Application Development framework for Joomla!™ 3 and 4
Stars: ✭ 106 (+606.67%)
Mutual labels:  joomla
lando-boilerplates-for-joomla-wordpress-and-prestashop
My personal recipes for Lando - Docker containers. Battle-tested for Joomla, WordPress, and PrestaShop.
Stars: ✭ 23 (+53.33%)
Mutual labels:  joomla
Killshot
A Penetration Testing Framework, Information gathering tool & Website Vulnerability Scanner
Stars: ✭ 237 (+1480%)
Mutual labels:  joomla

Attributes

Last Update Version Joomla Php

description in Russian here

The component implements additional attributes for:

  • system params,
  • menu,
  • users,
  • contacts,
  • articles,
  • categories,
  • modules,
  • plugins,
  • fields,
  • tags.

The following attribute types are implemented:

  • text (type="text"),
  • multiline text (type="textarea"),
  • editor (type="editor"),
  • list (type="list"),
  • image (type="media").

Type list supports the multiple value option.

Type multiline text supports the standard Joomla content filtering types: html, raw and others.

WARNING! Types multiline text and editor are not recommended for system parameters: when restoring a site using Akeeba Backup, parameter values may be lost.

Attribute values are stored in the parameters of the corresponding element, the params field (for articles in the attribs field).

Every attribute name is prefixed with attrs_ prefix. You can get the attribute value by the standard way described below.

For each attribute, it is possible to specify an individual output layout. Layouts are created in the /templates/{your_template}/html/layouts/com_attrs/ folder and are assigned to each attribute separately. The attribute data inside the layout is contained in the $displayData structure. The default layout does not contain markup.

Usage

Shortcode, for use in content editor

{attrs;dest;id;attrName[;layout]}
  • attrs - reserved word
  • dest - belonging to a specific type of record, one of: system, menu, users, contacts, articles, categories, modules, plugins
  • id - ID of the corresponding entry for the specified property, specify 0 for systems
  • attrName - attribute system name
  • layout - output layout (optional), if 0 or false is specified, the assigned layout will be ignored and the attribute value will be displayed without layout; format for specifying the layout: template:layoutname, where template is the main template of the site that contains the override (specify the underscore to indicate the default template), layoutname is the name of the overridden layout file, without extension; when specifying a nonexistent layout, the attribute value will not be displayed

Important: Unpublished attributes are ignored. Images are output without markup, only the path. Arrays are displayed as a list of values separated by commas.

Example: You have created an attribute with the name test for a material with ID = 5, to get its value, insert the following line in the editor: {attrs;articles;5;test}. If you want to display the attribute indicating the override of the template created with the name mytemplate in the main protostar site template, insert the following line into the editor: {attrs;articles;5;test;protostar:mytemplate}.

With helper

It is recommended because it checks the status of the attribute (published / unpublished) and it is not necessary to specify the prefix attrs_. Do not specify the third parameter or set it to zero to get the attribute value from the system configuration.

/*
AttrsHelper::ATTR_DEST_SYSTEM = 'system'
AttrsHelper::ATTR_DEST_MENU = 'menu'
AttrsHelper::ATTR_DEST_USERS = 'users'
AttrsHelper::ATTR_DEST_CONTACTS = 'contacts'
AttrsHelper::ATTR_DEST_ARTICLES = 'articles'
AttrsHelper::ATTR_DEST_CATEGORIES = 'categories'
AttrsHelper::ATTR_DEST_MODULES = 'modules'
AttrsHelper::ATTR_DEST_PLUGINS = 'plugins'
AttrsHelper::ATTR_DEST_FIELDS = 'fields'
AttrsHelper::ATTR_DEST_TAGS = 'tags'
*/

JLoader::register('AttrsHelper', JPATH_ADMINISTRATOR . '/components/com_attrs/helpers/attrs.php');

// output with the layout specified in the attribute parameters
$attrValue = AttrsHelper::getAttr($attrName, AttrsHelper::ATTR_DEST_ARTICLES, $article->id);

// priority layout output
// the attribute layout will be loaded /templates/protostar/html/layouts/com_attrs/mytemplate.php
$attrValue = AttrsHelper::getAttr($attrName, AttrsHelper::ATTR_DEST_ARTICLES, $article->id, 'protostar:mytemplate');

Without helper (not recommended)

This method does not support attribute standardization.

// default
$attrValue = $item->params->get("arrts_$attrName", '');

// for system
$attrValue = Joomla\CMS\Factory::getConfig->get("arrts_$attrName", '');

// for articles
$attribs = json_decode($article->attribs, true);
$attrValue = $attribs["arrts_$attrName"];
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].