The code previously would look for a file called extra-footer.html that a koji admin could override to put some nice extra footer on their koji-web page. If that file existed, koji-web would read it in verbatim and write it to the bottom of each served page.
This change enhances that behavior and treats the extra-footer.html file as a Cheetah template. This way, a koji admin could specify some conditional logic in the extra-footer file to display this or that thing depending on the dynamic contents of the page being served.
Note that this is backwards compatible. Static html extra-footer files already out there in the wild will be interpreted as Cheetah templates and should be included seamlessly. --- www/kojiweb/includes/footer.chtml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/www/kojiweb/includes/footer.chtml b/www/kojiweb/includes/footer.chtml index 8dad310..684e5a4 100644 --- a/www/kojiweb/includes/footer.chtml +++ b/www/kojiweb/includes/footer.chtml @@ -8,8 +8,7 @@
#set $localfooterpath=$util.themePath("extra-footer.html", local=True) #if os.path.exists($localfooterpath) -#set $localfooter="".join(open($localfooterpath).readlines()) -$localfooter +#include $localfooterpath #end if
</div>
On Friday, April 24, 2015 03:24:43 PM Ralph Bean wrote:
The code previously would look for a file called extra-footer.html that a koji admin could override to put some nice extra footer on their koji-web page. If that file existed, koji-web would read it in verbatim and write it to the bottom of each served page.
This change enhances that behavior and treats the extra-footer.html file as a Cheetah template. This way, a koji admin could specify some conditional logic in the extra-footer file to display this or that thing depending on the dynamic contents of the page being served.
Note that this is backwards compatible. Static html extra-footer files already out there in the wild will be interpreted as Cheetah templates and should be included seamlessly.
www/kojiweb/includes/footer.chtml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/www/kojiweb/includes/footer.chtml b/www/kojiweb/includes/footer.chtml index 8dad310..684e5a4 100644 --- a/www/kojiweb/includes/footer.chtml +++ b/www/kojiweb/includes/footer.chtml @@ -8,8 +8,7 @@
#set $localfooterpath=$util.themePath("extra-footer.html", local=True) #if os.path.exists($localfooterpath) -#set $localfooter="".join(open($localfooterpath).readlines()) -$localfooter +#include $localfooterpath #end if
</div>
ack
On 04/24/2015 03:24 PM, Ralph Bean wrote:
The code previously would look for a file called extra-footer.html that a koji admin could override to put some nice extra footer on their koji-web page. If that file existed, koji-web would read it in verbatim and write it to the bottom of each served page.
This change enhances that behavior and treats the extra-footer.html file as a Cheetah template. This way, a koji admin could specify some conditional logic in the extra-footer file to display this or that thing depending on the dynamic contents of the page being served.
Note that this is backwards compatible. Static html extra-footer files already out there in the wild will be interpreted as Cheetah templates and should be included seamlessly.
I am seeing this fail with a syntax error on some embedded javscript in a custom footer. This probably needs to be configurable behavior.
www/kojiweb/includes/footer.chtml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/www/kojiweb/includes/footer.chtml b/www/kojiweb/includes/footer.chtml index 8dad310..684e5a4 100644 --- a/www/kojiweb/includes/footer.chtml +++ b/www/kojiweb/includes/footer.chtml @@ -8,8 +8,7 @@
#set $localfooterpath=$util.themePath("extra-footer.html", local=True) #if os.path.exists($localfooterpath) -#set $localfooter="".join(open($localfooterpath).readlines()) -$localfooter +#include $localfooterpath #end if
</div>
On Thu, May 28, 2015 at 12:40:26PM -0400, Mike McLean wrote:
On 04/24/2015 03:24 PM, Ralph Bean wrote:
The code previously would look for a file called extra-footer.html that a koji admin could override to put some nice extra footer on their koji-web page. If that file existed, koji-web would read it in verbatim and write it to the bottom of each served page.
This change enhances that behavior and treats the extra-footer.html file as a Cheetah template. This way, a koji admin could specify some conditional logic in the extra-footer file to display this or that thing depending on the dynamic contents of the page being served.
Note that this is backwards compatible. Static html extra-footer files already out there in the wild will be interpreted as Cheetah templates and should be included seamlessly.
I am seeing this fail with a syntax error on some embedded javscript in a custom footer. This probably needs to be configurable behavior.
Ah, that's probably hitting a '#' or '$' in the javascript code and interpreting it as cheetah stuff.
buildsys@lists.fedoraproject.org