The template file for countdown content contains too much PHP and logic which is not aligned with Drupal module development guidelines. Is it possible to move most of the stuff into preprocess function and keep the template file clean for markup?

CommentFileSizeAuthor
#1 countdown-move-php-code-1194950-1.patch4.51 KBimiksu

Comments

imiksu’s picture

StatusFileSize
new4.51 KB

For example like this (see patch attached). That way themers can override template more cleanly. This patch isn't that D7:ish, but I hope this helps forward :)

usingsession’s picture

Issue summary: View changes

@imiksu thanks. Needs review:

git clone --branch '7.x-3.x' https://git.drupalcode.org/project/countdown.git
cd countdown

usingsession’s picture

Status: Active » Needs review
mahyarsbt’s picture

Status: Needs review » Closed (outdated)