Move footer content from template into footer.html (FS#2847) #338

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

Users should be able to customize the footer without modifying the Dokuwiki default template.

The current Dokuwiki default template contains buttons and links in tpl_footer.php. Removing or modifying this content requires changes to the template file. This is a bad approach because changes to the template will be lost after an upgrade.

Here is an example of this bad advice: http://www.inmotionhosting.com/support/edu/dokuwiki/change-dokuwiki-appearance/removing-footer-buttons-text

Moving the buttons and text content from the template and into a user editable file ('footer.html') is a better approach that will still display the default buttons and text yet allow users to make changes that persist after an update.

Jon Jaroker
http://jaroker.com

Collaborator

-1

Ideally, you copy and change the template. Those buttons are properly part of the "template footer" not the "customizable footer". Also if they were put in footer.html, it would become a file which could be changed in dokuwiki updates.

Owner

👎 for the reasons mentioned by @Chris--S

  1. "Those buttons are properly part of the template footer not the customizable footer": Prove it. The purpose of a CMS is to separate content from presentation. Placing user-changeable buttons into the template intermingles content with code, which is an anti-pattern.

  2. "Ideally, you copy and change the template": Yes, if I were making substantive changes to the template, I would copy the template. I am pointing out a defect in the template's design and suggesting that this defect be addressed in a better manner than telling users to create a copy of the template. Copying a template will then require users to apply code updates from the parent to the child template, which is a lot of overhead if one only wants to customize the footer.

3)" Also if they were put in footer.html, it would become a file which could be changed in dokuwiki updates". I don't understand how the comment applies to this proposed change. Updates to dokuwiki should not affect users' content.

Owner
  1. they are part of the template. if you don't like them use a different template or remove them yourself
  2. it's not a defect, they are supposed to be there
  3. if they were in footer.html we would deliver footer.html with the template (and thus with DokuWiki) upgrading DokuWiki would overwrite the file. It's not user content. It's part of the template.
@splitbrain splitbrain closed this Sep 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment