default website template files moved to lib
this frees up web/templates/ for user defined templates outside of source controlmaster
parent
780429be3d
commit
b0967b12b3
|
@ -9,10 +9,14 @@ WXRX_WEB_PUBDIR=${WXRX_WEB_PUBDIR:="${WXRX_WEB_DIR}/public"}
|
|||
# @output path to template
|
||||
# @return non-zero if path does not exist
|
||||
function template_path() {
|
||||
file=${WXRX_WEB_TEMPLATES}/${1}.template
|
||||
local file=${WXRX_WEB_TEMPLATES}/${1}.template
|
||||
local fallback="${rootdir}/lib/web-templates/${1}.template"
|
||||
if [ -f "$file" ]; then
|
||||
echo $file
|
||||
return
|
||||
elif [ -f "$fallback" ]; then
|
||||
echo $fallback
|
||||
return
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue