-
Notifications
You must be signed in to change notification settings - Fork 79
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
ENH Update code to reflect changes in template layer #1499
ENH Update code to reflect changes in template layer #1499
Conversation
d02215a
to
5711e1b
Compare
5711e1b
to
20fe9d5
Compare
'date_ago' => $version->dbObject('LastEdited')->Ago(), | ||
'date_formatted' => $version->dbObject('LastEdited')->Nice(), | ||
'date_ago' => $version->dbObject('LastEdited')?->Ago(), | ||
'date_formatted' => $version->dbObject('LastEdited')?->Nice(), |
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.
dbObject()
can return null
$template = SSViewer::chooseTemplate($templates); | ||
// Only render preview panel if a template specifically for the asset admin has been provided | ||
if ($template) { | ||
return $this->renderWith($template); | ||
if ($this->getTemplateEngine()->hasTemplate($templates)) { | ||
return $this->renderWith($templates); |
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.
Instead of getting a specific absolute path to a template, we just check if the engine configured for this controller is able to find a template.
Issue