Replace dirty placeholders with tokens
Problem description
The share
and expiration
pages are mostly static, with only a few fields having to be filled dynamically. Drupal 7 has a system to handle that usecase : Tokens.
The limitation
page is also a static page where default site limitations are displayed (ie : nb of forms / user, etc.) This could also be made dynamic using tokens.
For now, all these pages are dynamically built at every query using custom menu link callbacks (get_xxxx_content()
and likes). This triggers the whole Drupal framework on each query where pages could be cached more efficiently by exposing the appropriate information as tokens, and using these tokens on the page. The code readability and maintainability would also be improved
Proposed resolution
- modify the fields for
form1
to expose the information as Drupal tokens. - also expose the site's limitations (stored as global variables) as tokens.
- edit the pages to display tokens.