Adding new dropdown option in table list

For Joomla! 3.x Coding related discussions, please use:

Moderator: ooffick

Forum rules
Please use the mailing list here: rather than this forum.
Post Reply
User avatar
Dangerous Boy
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Mon Dec 26, 2005 6:25 pm
Location: Home

Adding new dropdown option in table list

Post by Dangerous Boy » Wed Oct 20, 2021 5:19 am

Joomla! v3
When enter in Articles page or com_content, it shows a list of articles from that table list
the column [Status] shows a few buttons in group and 1 of them is a dropdown button.
My question is, how can I add a custom button inside that dropdown list...
currently it shows
[Archive] and [Trash]
I'd like to add one more so it shows 3 options like
[gitLab] [Archive] [Trash]

the code that renders that part is:

Code: Select all

<div class="btn-group">
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'articles.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
<?php echo JHtml::_('contentadministrator.featured', $item->featured, $i, $canChange); ?>
	<?php // Create dropdown items and render the dropdown list.
		if ($canChange)
		JHtml::_('actionsdropdown.' . ((int) $item->state === 2 ? 'un' : '') . 'archive', 'cb' . $i, 'articles');
		JHtml::_('actionsdropdown.' . ((int) $item->state === -2 ? 'un' : '') . 'trash', 'cb' . $i, 'articles');
		echo JHtml::_('actionsdropdown.render', $this->escape($item->title));
I haven't find any documentations for that, also I'd like to know what those 'un' this new item is needed and will be connected to an API the final url will be something like <a href="/api/articleId=123&_token=sss">Export</a>

Thank you in advance.
Nothing for the moment....

Post Reply

Return to “Joomla! 3.x Coding”