Foxtrek_64 Posted August 31, 2020 Posted August 31, 2020 (edited) Hello, I'm trying to get the copyright line to display the current year. Copyright ©️ LuzFaltex, LLC 2014-<?php echo date("Y"); ?>, all rights reserved <span id="elCopyright_userLine">Copyright ©️ LuzFaltex, LLC 2014-<!--?php echo date("Y"); ?-->, all rights reserved</span> I have also tried using template syntax, but this just gets rendered raw. <span id="elCopyright_userLine">Copyright ©️ LuzFaltex, LLC 2014-{{date("Y")}}, all rights reserved</span> I tried searching for this copyright line in the templates, but neither the global nor footer templates have any mention of this. The footer template ends with the "Contact Us" link and the global template just references the footer and then moves on to javascript. Is there a way that I can do what I'm trying to accomplish here or do I need to just opt for no copyright line and then create it myself manually by modifying the footer template? Edited August 31, 2020 by Foxtrek_64 Fix code blocks
Foxtrek_64 Posted August 31, 2020 Author Posted August 31, 2020 35 minutes ago, Ryan Ashbrook said: {expression="date('Y')"} Try that. Hi Ryan, Thanks for the response. Unfortunately this also renders as raw text. Copyright line text: Copyright ©️ LuzFaltex, LLC 2014-{expression="date('Y')"}, all rights reserved Rendered text: <span id="elCopyright_userLine">Copyright ©️ LuzFaltex, LLC 2014-{expression="date('Y')"}, all rights reserved</span>
CoffeeCake Posted August 31, 2020 Posted August 31, 2020 Are you trying to do this in the ACP copyright option or editing the templates?
DawPi Posted August 31, 2020 Posted August 31, 2020 1 hour ago, Foxtrek_64 said: Is there a way that I can do what I'm trying to accomplish here or do I need to just opt for no copyright line and then create it myself manually by modifying the footer template? Correct. 🙂
Foxtrek_64 Posted August 31, 2020 Author Posted August 31, 2020 18 minutes ago, Paul E. said: Are you trying to do this in the ACP copyright option or editing the templates? Through the ACP. 16 minutes ago, DawPi said: Correct. 🙂 I'll do it through the templates. That seems the easiest option here.
Ioannis D Posted August 31, 2020 Posted August 31, 2020 With javascript? <script type='text/javascript'>document.write(new Date().getFullYear());</script>
Foxtrek_64 Posted August 31, 2020 Author Posted August 31, 2020 4 minutes ago, Ioannis D said: With javascript? <script type='text/javascript'>document.write(new Date().getFullYear());</script> I was able to get it with modifying the template. I'm not unfamiliar with template modifications, but I was trying to figure out if I could do it with the built-in copyright text system. Ioannis D 1
Ryan Ashbrook Posted August 31, 2020 Posted August 31, 2020 Just now, Foxtrek_64 said: I was able to get it with modifying the template. I'm not unfamiliar with template modifications, but I was trying to figure out if I could do it with the built-in copyright text system. Oh, no that is made for just simple plaintext. If you want to do dynamic things like JavaScript or PHP, then the templates would need to be modified. 🙂 Foxtrek_64 1
Recommended Posts