The generated copyright years include years when blogs posts have been published. The component considers only published posts. It finds the minimum and maximum years of a publication.
Available components
- CopyrightYears.
Available languages
- en — English;
- ru — Russian.
Requirements
- RainLab Blog plugin.
License
The MIT License (MIT)
Copyright © 2016 thewizardplusplus
CopyrightYears
Use the copyrightYears
component to calculate and display of copyright years.
The copyrightYears
component injects the following variables to the page where it's used:
startYear
— a minimum year of a publication;endYear
— a maximum year of a publication.
The next example shows the basic component usage in the footer partial (from the Demo theme):
[copyrightYears] == <div id="footer"> <div class="container"> <hr /> <p class="muted credit">© {% component 'copyrightYears' %} admin.</p> </div> </div>
The default markup (plugins/thewizardplusplus/copyrightyears/components/copyrightyears/default.htm
) displays the start and end years hyphenated:
© 2015-2016 admin.
If the start and end years are equals it displays only one:
© 2016 admin.
-
This plugin has not been reviewed yet.
-
1.0.0 |
First version. Jan 26, 2016 |
---|