How to config JHtmlJGrid::publishedOptions ?

389 views
Skip to first unread message

Soheil Novinfard

unread,
Feb 6, 2012, 2:12:39 PM2/6/12
to joomla-de...@googlegroups.com
Hi everybody.

I use this code for my published list grid :
<?php echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true);?>

But I want to customize it and not use "all" in options.

As I see in this documentation, we can do this by using array for configure it:
http://docs.joomla.org/JHtmlJGrid::publishedOptions/11.1

Something like array('published', 'unpublished')

But how can I change my code to do this?

Thanks
Novinfard

Soheil Novinfard

unread,
Feb 7, 2012, 4:55:10 AM2/7/12
to Joomla! General Development
No way?

Tuan Pham Ngoc

unread,
Feb 7, 2012, 5:03:41 AM2/7/12
to Joomla! General Development
I think simply use

<?php echo JHtml::_('select.options',
JHtml::_('jgrid.publishedOptions', array('all' => 0)),'value', 'text',
$this->state->get('filter.published'), true);?>

should work !

Tuan

Soheil Novinfard

unread,
Feb 7, 2012, 8:10:47 AM2/7/12
to Joomla! General Development
Thanks Tuan Pham Ngoc!
It works well ;)
Reply all
Reply to author
Forward
0 new messages