Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@
* Featured content controller class.
*
* @since 1.6
*
* @deprecated 6.0 will be removed in 8.0
* Use \Joomla\Component\Content\Administrator\Controller\ArticlesController instead
* For Quickicons use articles.getQuickiconFeatured()
*/
class FeaturedController extends ArticlesController
{
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel The model.
*
* @since 1.6
*/
public function getModel($name = 'Feature', $prefix = 'Administrator', $config = ['ignore_request' => true])
{
return parent::getModel($name, $prefix, $config);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
}

if ($saveOrder && !empty($this->items)) {
$saveOrderingUrl = 'index.php?option=com_content&task=articles.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1';
$controller = $featured === '1' ? 'featured' : 'articles';
$saveOrderingUrl = 'index.php?option=com_content&task=' . $controller . '.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1';
HTMLHelper::_('draggablelist.draggable');
}

Expand Down Expand Up @@ -154,7 +155,7 @@
</tr>
</thead>
<tbody<?php if ($saveOrder) :
?> class="js-draggable" data-url="<?php echo $saveOrderingUrl; ?>" data-direction="<?php echo strtolower($listDirn); ?>" data-nested="true"<?php
?> class="js-draggable" data-url="<?php echo $saveOrderingUrl; ?>" data-direction="<?php echo strtolower($listDirn); ?>"<?php echo $featured === '1' ? '' : ' data-nested="true"'; ?><?php
endif; ?>>
<?php foreach ($this->items as $i => $item) :
$item->max_ordering = 0;
Expand Down Expand Up @@ -192,7 +193,7 @@
}

?>
<tr class="row<?php echo $i % 2; ?>" data-draggable-group="<?php echo $item->catid; ?>"
<tr class="row<?php echo $i % 2; ?>"<?php echo $featured === '1' ? '' : ' data-draggable-group="' . $item->catid; ?>
<?php echo $dataTransitionsAttribute ?? '' ?>
>
<td class="text-center">
Expand Down