Hello,
So let's say I want to have an additional logo (not change an existing one) on the Login Page.
I create an own skin and copy the according html template file to <skin>/Services/Init/.
Now I insert a line into the template file. Let's say
<div id="il_new_logo">
<img class="hidden-xs noMirror" src="{HEADER_NEW_LOGO}" alt="Logo" />
</div>
As far as I understood, using variables is the best practice for images. Nevertheless I have to tell the PHP backend to initiate the variable HEADER_NEW_LOGO correctly.
So I found in the ilias/Services/Init/classes/class.ilStartUpGUI.php the following line:
$tpl->setVariable('HEADER_ICON', ilUtil::getImagePath('HeaderIcon.svg'));
So I conclude that I have to copycat this line, put it right behind the found one and insert my values.
$tpl->setVariable('HEADER_ICON', ilUtil::getImagePath('HeaderIcon.svg'));
$tpl->setVariable('HEADER_NEW_LOGO', ilUtil::getImagePath('new_logo.svg'));
Of course I put my image into the image directory of my skin and everything worked correctly...
BUT IMO this doesnt seem to be best practice. So I tried copying this class file like a template file into my skin but this didn't work.
So my question for you:
- Is there a way to define a variable value in a skin?
- If this needs to be done in the PHP code, is there a best-practice? Maybe even inside my skin?
- If not, how likely will my change be deleted by next version of ILIAS? Do I have to check whether my change still exists after every patch and maybe even need to repatch?
Thank you in advance. Overall the Developer Documentation is very helpful and I think the team is doing a great job.
Best Regards
AutoFahrenIstScheisse