Breadcrumbs
HTML
HTML
- Detalhes
-
Categoria: HTML
-
Última atualização: 19 Outubro 2009
-
Criado: 28 Setembro 2009
JHTML::_('behavior.modal', $selector, $arrayparams)
Calls javascript to display ligthboxes, popups with good visual appearance, to display images, external pages, or views of own component.
Defined in
/joomla/html/html/behavior.php ( line 117 )
Importing
JHTML::_('behavior.modal');
Note: This is the basic import. If someone more know the adicional params, please email me.
Examples
The code below illustrates how to call an external site to open in a lightbox
Code:Output :
JHTML::_('behavior.modal'); ?> Click me :DThis code is simple. Is near one simple < a > link with plus some javascript information like size that you can edit. The only requiriment is that you must call at any part of your document the JHTML::_('behavior.modal'), that will incluse on html head that all mootools javascript to run lightbox.
The code below illustrates how to receive data from a view called the lightbox - Good for complex popups
Description: On this example you will need make a new component or implement in your component. At the end of this page you will find one download link to one example component that is done with this logic.
Code for your the view that will receive the data. In this case com_wedmodal/views/wedmodals/tmpl/default.php. This will call the mooltools, and the specific javascript funtion ro receive two variables:On the same file, add this form com_wedmodal/views/wedmodals/tmpl/default.php:
Ok. Now you have the basic main page to receive the data. But as you see on heref of the link on last code, you will need call one task from the controller. Lets put code of the task mypopuptask on com_wedmodal/controllers/popup.php:
On last controller code, you will call one Model 'popup' that in this example no do not have some special code. Just add one empty model with the class WedmodalsModelPopup for do not have errors.
Also, on com_wedmodal/views/popup/view.html.php do not need any special code, just add like any other view.html.php
Finaly, we will set what will appear on com_wedmodal/views/popup/tmpl/default.php, the real content that you will see when click on link of this fist code of this example:
As you see, this is just one link with same amount of variables that we have to receive on com_wedmodal/views/wedmodals/tmpl/default.php. Is really important that you pay atention on all these steps, and also download the code with the working example for do not lose time.This is a simple example, but have sure that you can do thinks really interesting, like call one view with a long list of articles and when you click on article the link give back to the page the ID of that article.
The code below illustrates how to receive data from a funtion inside of view.html.php called the lightbox - Good for simple popups
Soon I will add here this tutorial, but anyway of can see the working code the file for download. Also, this example is not so diferent from method that call one entire view.Download example code
See also
JHTML::image($url, $alt, $arrayattribs)
Escrito por Administrator- Detalhes
-
Categoria: HTML
-
Última atualização: 19 Outubro 2009
-
Criado: 07 Junho 2009
JHTML::image($url, $alt, $arrayattribs)
Write a < img > < /img > element
(string $url, string $alt, [array $attribs = null])
Defined in
/joomla/html/html.php
Importing
jimport('joomla.html.html');
Examples
Code:Output :
jimport('joomla.html.html'); echo JHTML::image('images/save.png','save.png'); ?>
See also
Leia-me Joomla API @fititntblog
Escrito por Emerson Rocha Luiz- Detalhes
-
Categoria: HTML
-
Última atualização: 26 Setembro 2009
-
Criado: 07 Junho 2009
Atualmente, não se tem muito conteúdo realmente explicando como programar em joomla, a não ser alguns livros em inglês. Mesmo a wiki oficial ( aka docs.joomla.org ) não tem tudo que deveria em tese ter. A API é sempre a API, e estará lá porque é um pre-requisito minimo que se deveria ter, e a equipe oficial de documentação faz questão de pelo menos isso deixar bem organizado. Mas... e o resto? Cada um tem que eu correr atrás, ou então vai sofrer, porque muit coisa falta, e que só é abrangida por alguns livros em inglês, ou nem isso. O que acredito que vou fazer é fazer documentação de alguns detalhes que hoje não estão no docs.joomla.org, e esse blog vai servir como rascunho ou pelo menos um ponto fixo de onde qualquer conteúdo que eu publique em outros sites, haverá uma cópia aqui também.
Espero que seja útil aos programadores que querem encarar joomla um pouco mais a sério, ou também a usuáriso comuns que estão passando pro algum detalhe ou querem fazer algo um pouco diferente e que com algum empurraozinho vão conseguir.
Um detalhe importante a ressaltar é que, embora o layout aqui seja do tipo blog, alguns desses artigos que estou escrevendo referente a API não estão prontos e, dentro do possivel, estarão sendo atualizados com alguma frequência, até terem um contedúdo relativamente 'sólido' e que não precise de mais atualizações.
Outro ponto importante também, é que sim, pelo menos por enquanto o que é relativo a API está e vai ser escrito em inglês. Como estou preparando para publicar em no Joomla Docs, jpa vou deixar preparado em inglês. De qualquer forma, em geral não vai ser complicado para quem quer programar ler os exemplos aqui. Ainda mais por ser inglês tecnico, e boa parte das principais palavras se repetirem.
- Detalhes
-
Categoria: HTML
-
Última atualização: 12 Junho 2009
-
Criado: 07 Junho 2009
JHTML::link($url, $text, $arrayattribs)
Write a element
(string $url, string $text, [array $attribs = null])
Defined in
/joomla/html/html.php
Importing
jimport('joomla.html.html');
Examples
Code:
jimport('joomla.html.html'); echo JHTML::link('http://www.joomla.org','Joomla Site');
Output :
jimport('joomla.html.html'); echo JHTML::link('http://www.joomla.org','Joomla Site'); ?>