Run template functions based on data attributes #20
Labels
No Label
bug
code-quality
documentation
duplicate
enhancement
feature
flair
invalid
on-hold
release
third-party bug
tooling
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fwdekker.com/template#20
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Instead of relying on pages that use the template to run
header()
and similar functions, the template should run those functions based on the data embedded in, say, the meta tags or based on data attributes attached to thebody
. For example, using meta tags, the page using the template could includeMaybe some tags (such as
fwd:header:description
) are not necessary since there is also thedescription
meta tag already. (But maybe I'll just keep the duplicate tag.)Not including the tag means that
undefined
is passed to the function. Not including thevalue
attribute in the tag meansnull
is passed to the function. Usingvalue=""
means that the empty string is passed to the function.Not including any
fwd:footer:*
tags at all means that the template will not run itsfooter
function. To runfooter
with allundefined
values, the tagfwd:footer
should be added without the value attribute.The advantage of this method is that pages such as the error pages do not need to include and compile scripts, which simplifies the page.