Skip to content

Commit

Permalink
Merge pull request #12 from FriendsOfOro/fix/11-fix-display
Browse files Browse the repository at this point in the history
Fix config usage
  • Loading branch information
Xavier Besson authored Feb 28, 2020
2 parents 6a8be15 + 130c8d2 commit 32e001b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/Layout/DataProvider/SliderDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,14 @@ public function getSliderUsedConfig()
return $this->sliderRepository->find($sliderId);
}

public function getSliderCodeUsedConfig()
{
$sliderId = $this->config->get('slider_bundle.slider');

/** @var Slider $slider */
$slider = $this->sliderRepository->find($sliderId);

return $slider->getCode();
}

}
2 changes: 1 addition & 1 deletion src/Resources/views/Slide/view.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{% block pageHeader %}
{% set breadcrumbs = {
'entity': entity,
'indexPath': path('kiboko_slider_index'),
'indexPath': path('kiboko_slide_index'),
'indexLabel': 'kiboko.slide.entity.label'|trans,
'entityTitle': entity.name|default('N/A'|trans)
} %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ layout:
home_page_slider:
blockType: text
options:
text: "=data['slider'].getSliderUsedConfig()"
text: "=data['slider'].getSlidesBySliderCode(data['slider'].getSliderCodeUsedConfig())"
tree:
page_content:
home_page_slider: ~

0 comments on commit 32e001b

Please sign in to comment.