Skip to main content

Fix override of layouts

76 Views
0 Replies
1 min read

Hi, 

it's currently not possible to override the consolidated reports layout (for example), because the base path is set in the renderLayout function.

hence, the layout included path are starting with the one shipped in the component, which is always found of course...

Layout: bootstrap5.reports.consolidated
Include Paths: Array
(
     => /my/website/path/components/com_communitysurveys/layouts
     => /my/website/path/administrator/templates/atum/html/layouts/com_communitysurveys
     => /my/website/path/components/com_communitysurveys/layouts
     => /my/website/path/administrator/templates/atum/html/layouts
     => /my/website/path/layouts
)

Searching layout for: bootstrap5/reports/consolidated.php
Found layout: /my/website/path/components/com_communitysurveys/layouts/bootstrap5/reports/consolidated.php

to fix this, base path has to be removed from renderLayout call, for example in administrator/components/com_communitysurveys/views/reports/tmpl/default.php, line 47

<?php echo SurveyHelper::renderLayout($layout.'.reports.'.$this->layout, array('data'=>$this), CS_LAYOUTS_BASE_PATH, array('debug' => false));?>
 
should be
 
<?php echo SurveyHelper::renderLayout($layout.'.reports.'.$this->layout, array('data'=>$this), null, array('debug' => false));?>

0 Replies

No Replies Yet

Topic Author

J

julv

@julv

Topic Stats

Created Monday, 28 August 2023 10:58
Last Updated Tuesday, 29 August 2023 07:47
Replies 0
Views 76
Likes 0

Share This Topic