Compile!
We did about 10,000 tests on it, and it was working fine until Monday
Произвольное поле для материала в Joomla
(20.08.2012)
Фишка Джерси - добавить произвольное поле к материалу без работы с БД:
Заносим данные поля в /administrator/components/com_content/models/forms/article.xml
<fields name="images">
<field
name="image_intro"
type="media"
label="COM_CONTENT_FIELD_INTRO_LABEL"
description="COM_CONTENT_FIELD_INTRO_DESC" />
...
</fields>
В компоненте выуживаем данные:
<?php foreach ($this->items as $i => $article) : ?>
<img src="<?=json_decode($article->images)->image_intro?>"/>
<?php endforeach; ?>
Это возможно, т.к. содержимое каждой предопределенной группы полей (fields) хранится в json.
Joomla
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus
JavaScript
(13)
PHP
(11)
Brainfuck
(8)
adm
(8)
Joomla
(4)
Canvas
(3)
answers
(2)
API
(2)
CMS
(2)
Modx
(2)
jQuery
(1)
Ajax
(1)
SQL
(1)
Shell
(1)
batch
(1)
10
-6