The complete list of attributes in a leaf of articles… Полный список атрибутов в листе статей…
Question: how in the best way to display the identifier of category of articles?
Вопрос: как наилучшим образом отобразить идентификатор категории статей?
{section name=$this->i loop=$this->articles_approved}
{$this->articles_approved[$this->i]->category_id}
{/section}
Create the unit and place in it the following code: Создайте блок и разместите в нем следующий код:
HTML<style type="text/css" media="all"><!--
body { color: black; font-size: 7pt; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: white; }
table { background: #e6e6e6 no-repeat; }
table td, caption { background: white no-repeat; padding: 2px 4px; width: 18px; height: 12px; white-space: nowrap; }
/*{$this->Url->skin}*/
table td.edit { background: white url(
http://ck-kindergarten.ru/skins/ckkindergartenru/icon_18x12_edit.gif) no-repeat center; }
table td.look { background: white url(
http://ck-kindergarten.ru/skins/ckkindergartenru/icon_18x12_latest.gif) no-repeat center; }
--></style>
<table cellspacing="1"><caption><a href="{$this->relpath}">home</a></caption>
<tr>
<!--<th>about</th>-->
<th>author_id</th>
<th>category_id</th>
<th>comment_count</th>
<!--<th>custom_fields</th>
<th>custom_float</th>
<th>custom_string</th>-->
<th>date</th>
<th>edit_date</th>
<th>editor_id</th>
<th>featured_state</th>
<th>id</th>
<th>ip</th>
<!--<th>keywords</th>-->
<!--<th>options</th>-->
<th>parent_id</th>
<th>rating</th>
<!--<th>settings</th>-->
<th>state</th>
<!--<th>summary</th>-->
<!--<th>tags</th>-->
<!--<th>text</th>-->
<th></th>
<th></th>
<th>title</th>
<!--<th>type</th>-->
<!--<th>urltitle</th>-->
<th>view_count</th>
</tr>
{section name=$this->i loop=$this->articles_approved}
<tr>
<!--<td>{*$this->articles_approved[$this->i]->about*}</td>-->
<td>{$this->articles_approved[$this->i]->author_id}</td>
<td>{$this->articles_approved[$this->i]->category_id}</td>
<td>{$this->articles_approved[$this->i]->comment_count}</td>
<!--<td>{*$this->articles_approved[$this->i]->custom_fields*}</td>
<td>{*$this->articles_approved[$this->i]->custom_float*}</td>
<td>{*$this->articles_approved[$this->i]->custom_string*}</td>-->
<td>{$this->articles_approved[$this->i]->date}</td>
<td>{$this->articles_approved[$this->i]->edit_date}</td>
<td>{$this->articles_approved[$this->i]->editor_id}</td>
<td>{$this->articles_approved[$this->i]->featured_state}</td>
<td>{$this->articles_approved[$this->i]->id}</td>
<td>{$this->articles_approved[$this->i]->ip}</td>
<!--<td>{*$this->articles_approved[$this->i]->keywords*}</td>
<td>{*$this->articles_approved[$this->i]->options*}</td>-->
<td>{$this->articles_approved[$this->i]->parent_id}</td>
<td>{$this->articles_approved[$this->i]->rating}</td>
<!--<td>{*$this->articles_approved[$this->i]->settings*}</td>-->
<td>{$this->articles_approved[$this->i]->state}</td>
<!--<td>{*$this->articles_approved[$this->i]->summary*}</td>-->
<!--<td>{*$this->articles_approved[$this->i]->tags*}</td>
<td>{*$this->articles_approved[$this->i]->text*}</td>-->
<td class="edit" onclick="document.location.href='{$this->Url->edit_article}?id={$this->articles_approved[$this->i]->id}'" title="Редактировать"></td>
<td class="look" onclick="document.location.href='{$this->articles_approved[$this->i]->url}'" title="Посмотреть"></td>
<td>{$this->articles_approved[$this->i]->title}</td>
<!--<td>{*$this->articles_approved[$this->i]->type*}</td>-->
<!--<td>{*$this->articles_approved[$this->i]->urltitle*}</td>-->
<td>{$this->articles_approved[$this->i]->view_count}</td>
</tr>
{/section}
</table>
PHP$this->bypass_cms = 2;
$this->_allow_site_bar = 0;
$this->title = '';
$user_id = $this->User->id;
if (isset($this->get['penname']) and $this->get['penname']) {
$User = $this->getUser(intval($this->get['penname']));
if ($User->main_id == $this->User->main_id) { $user_id = $User->id; }
}
//$this->articles_drafts = $this->getArticles("article_state = ".ARTICLE_STATE_DRAFT." AND article_author_id = {$user_id}", 'article_id DESC', 50, 1);
$this->articles_approved = $this->getArticles("article_author_id = {$user_id} AND article_category_id", 'article_id DESC', 250);
//$this->articles_pending = $this->getArticles("article_state = ".ARTICLE_STATE_PENDING." AND article_author_id = {$user_id}", 'article_id', 50, 1);
//$this->articles_declined = $this->getArticles("article_state = ".ARTICLE_STATE_DECLINED." AND article_author_id = {$user_id}", 'article_id DESC', 50, 1);
Question: how in the best way to display the identifier of category of articles?
Вопрос: как наилучшим образом отобразить идентификатор категории статей?
{section name=$this->i loop=$this->articles_approved}
{$this->articles_approved[$this->i]->category_id}
{/section}