A plugin for October CMS that provides the component for calculation and displaying of copyright years.
Copyright years contains years when posts have been published. The component considers only published posts. It finds the minimum and maximum years of a publication.
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.
- en — English;
- ru — Russian.
- RainLab Blog plugin.
Footer markup:
Footer view:
The MIT License (MIT)
Copyright © 2016 thewizardplusplus thewizardplusplus@yandex.ru