Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 13, 2026

Motivation

  • Prevent generating the carousel DOM id inside the Smarty template to avoid template-side uniqid usage and potential caching/duplicate id issues.
  • Ensure a single unique id is produced on the PHP side so templates can rely on a precomputed value.
  • Make the hook output deterministic for cached templates by computing the id before assigning Smarty variables.

Description

  • Generate the carousel id in hookDisplayHome with $carouselId = 'everpsblog-home-slider-' . uniqid('', true); and assign it to Smarty as carousel_id in everpsblog.php.
  • Remove the Smarty-side {assign var=carousel_id value='everpsblog-home-slider-'|cat:uniqid()} from views/templates/hook/home.tpl and use the assigned {$carousel_id} directly.
  • Updated files: everpsblog.php and views/templates/hook/home.tpl to centralize id generation in PHP.

Testing

  • No automated tests were executed for this change.
  • Changes were committed and both modified files were staged and recorded in a commit titled Fix home carousel id assignment.

Codex Task

@CySSoO CySSoO merged commit 615727e into master Jan 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants