Apostila De C Digos JSeblod CCK

390 palavras 2 páginas
Apostila de Códigos

Curso Desenvolvendo
Componentes com jSeblod
CCK

com Leo Miranda

Apostila de Códigos para jSeblod
Importar CSS
<?php
$document =& JFactory::getDocument();
$document->addStyleSheet( $this->baseurl.'/templates/'.$this>template.'/css/template.css' );
?>

Importar JS
<?php
$document =& JFactory::getDocument();
$document->addScript( $this->baseurl.'/templates/'.$this>template.'/javascript/script.js' );
?>

Mostrar campos em geral
<?php echo @$jSeblod->nome-do-campo->atributo; ?>
Atributos:


value



title



label



description



html

Mostrar campos do core
<?php echo $this->content->atributo; ?>
Atributos:


id



title



alias



state



sectionid



catid



created



created_by



created_by_alias



modified



publish_up



publish_down



access



metakey



metades



art_link



editart_link

Mostrar campos do core especiais
<?php echo $this->content->atributo; ?>
Atributos:


section



category



author



usertype



group



hits



rating

Mostrar campos do core de usuários
<?php echo $this->user->atributo; ?>
Atributos:


name



username



email



usertype



registerDate

Mostrar campos tipo imagem
<?php echo @$jseblod->nome-do-campo->atributo; ?>
Atributos:


value



thumb1



thumb2



thumb3



thumb4



thumb5

Mostrar campos X
<?php echo @$jseblod->nome-do-campo[$i]->atributo; ?>
Exemplo:
for ( $i = 0, $n = count( @$jSeblod->fieldX_name ); $i < $n; $i++ ) { echo @$jSeblod->fieldX_name[$i]->atributo;
}
Saida: echo @$jSeblod->fieldX_name[0]->value; echo @$jSeblod->fieldX_name[1]-> value;

Mostrar campos de artigos externos
<?php echo @$jseblod->nome-do-campo[nome-do-campo-externo]->atributo; ?>
Exemplo:
<?php echo @$jseblod->artigo-escolhido-em-uma-lista[art_link]->value; ?>

Mostrar campos de arquivo
<?php echo @$jseblod->nome-do-campo->atributo; ?>
Atributos:


value



download



downloaded

Mostrar campo tipo grupo (tipos de conteúdos)
<?php echo

Relacionados