madeyourday/rocksolid-slider

Improve backend view for slider elements

Closed this issue · 2 comments

Here's a suggestion to show the slider name in the content element overview.
Update MadeYourDay\Contao\Module\Slider::generate() and replace the wildcard code with:

// Display a wildcard in the back end
if (TL_MODE === 'BE') {
    $template = new \BackendTemplate('be_wildcard');

    $template->wildcard = '### ROCKSOLID SLIDER ###';

    if (($slider = SliderModel::findByPk($this->objModel->rsts_id)) !== null) {
        $template->id       = $slider->id;
        $template->link     = $slider->name;
        $template->href     = 'contao/main.php?do=rocksolid_slider&table=tl_rocksolid_slide&id=' . $slider->id;
    }

    return $template->parse();
}
ausi commented

Thanks for the suggestion, but the correct place for this issue would be in madeyourday/contao-rocksolid-slider as it is regarding the Contao integration, not the JS slider itself.