how to make custom templates in Koken -
i'm using koken , customize template text entries putting date @ top of entry.
i hacked call new date()
core template file /admin/templates/text.tmpl.html
<div id="entry-editor"> <div id="edit-area" data-bind="html: content() || '<p class=\'date\'>' + new date() + '</p> <p class=\'media-row\'><br /></p>'"> </div> </div> <!-- close #entry-editor -->
this works fine, know perils of hacking core files.
as of writing, don't see answer on page linked "define own custom template types" on help.koken.me.
without hacking core files, how can have koken add date top of each text entry?
from http://help.koken.me/customer/portal/questions/1080677-how-to-make-custom-templates-in-koken-
simply place <koken:time>
tag in customized theme template.
for example, in /storage/themes/<custom-theme-name>/essay.lens
file:
<header> <h2> <koken:link>{{ essay.title }}</koken:link> </h2> <p> <strong><koken:time show="time" /> <koken:time show="date" /></strong> </p> </header>
Comments
Post a Comment