Is there a variable to show the current year?
Best Answers
-
Without knowing if there is a built-in variable, I'd just run it through JavaScript.
- Add a textbox where you want your copyright statement to reside.
- Add an action under that text block that will Run Javascript on a the trigger OnPageShow.
- Add in the code below.
- Bob's your uncle.
var tempYear = new Date().getFullYear(); text41.actionChangeContents('Copyright © ' + tempYear, 'alignleft','1');
Replace text41 with your HTML Name of the copyright text block.
Andrew R.
Developing content since 2010 using a mixed bag of tools. -
-
@LisaB2022 , you can add text to that blank textbox and once the JavaScript code is ran, it will replace its contents.
I typically add in some indicator text to all textboxes that have actions that modify them.. I know ELB Lectora uses something like <Title> where anything with < > indicate text that is automatically modified on runtime.
So for this example, you could use something like... <Copyright details here> in the textblock.
Andrew R.
Developing content since 2010 using a mixed bag of tools.
Answers
-
LisaB2022 Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 37 ☆ Roadie ☆
-
LisaB2022 Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 37 ☆ Roadie ☆
@andrew-robertson What a GREAT way to start out my morning! Thank you for the sample. I copied it added the organization name before copyright and ... Bob is my uncle ;)
For those who may try this for the first time, this is how your text box views on the screen with the javascript. Notice the text box is blank (I added the border so you can see where it is on the screen (since removed it so text appears as above). Because of this I separated the javascript text box from the original text box with the detailed agreement.
Categories
- 35.9K All Categories
- 109 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 29K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 25 ELB Learning Content
- 25 ELB Learning Content Discussions
- 328 CenarioVR®
- 195 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 42 Rockstar Learning Platform®
- 39 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 936 All Things eLearning
- 37 eLearning Development
- 546 Learning Management System (LMS) Integration
- 333 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products