-
-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REF] Remove redundant uf templates #31109
[REF] Remove redundant uf templates #31109
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
$config = CRM_Core_Config::singleton(); | ||
return 'CRM/common/' . strtolower($config->userFramework) . '.tpl'; | ||
// Despite what the template is called | ||
return 'CRM/common/CMSPrint.tpl'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change would mean that this template file wouldn't be picked up https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/common/joomla.tpl when i think it probably should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhhh I always forget Joomla!
Thanks @seamuslee001 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm looking at the discrepancies between joomla.tpl
and CMSPrint.tpl
and wondering if they are mainly because other people have forgotten that separate Joomla template exists when making changes.
I.e. 4e6258a - is there any reason this wouldn't make sense on Joomla?
The other substantive changes I can see is there is an extra crm-content
div wrapper inside the crm-container
wrapper. Does it do anything?
And the breadcrumbs seem to come through with {$crumb.url} and {$crumb.title} on Joomla, whereas CMSPrint just outputs { $crumb } .
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added override for Joomla for now though I feel like it would be good if they could be converged.
CRM/Utils/System/Base.php
Outdated
@@ -78,15 +78,11 @@ abstract public function loadBootStrap($params = [], $loadUser = TRUE, $throwErr | |||
* or equal 0 if not in print mode. | |||
*/ | |||
public static function getContentTemplate($print = 0): string { | |||
if ($print === CRM_Core_Smarty::PRINT_JSON) { | |||
return 'CRM/common/snippet.tpl'; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a memory that this was needed for something, like string vs int issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, thanks php...
Also wow thanks @demeritcowboy - you have a great eye/memory!
I'll remove this commit
84aaa18
to
f019cd6
Compare
f019cd6
to
bb5ac01
Compare
Before
After
Technical Details
I suppose in theory you could override the different CMS templates with per-UF variants in a single extension, to achieve different behaviours on different UFs.
But that would be quite a strange thing to do I think. Direct template overrides aren't recommended.
Comments
I'll miss Drupal6...