Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2220

phpBB Custom Coding • Re: Importing macro into template not being refreshed by cache

$
0
0
No idea why it would require browser refresh but I' not familiar with twig, that's odd. It would imply the donovalues file is being cached on server and only invalidated with browser refresh which doesn't make much sense. Someone else may be able to help you with that,
Any idea on how to solve what we do (loading dynamic values into a template) in a more robust way that has no cache issues?
Where are you getting values? DB entry?



Around line 4015 of includes/functions.php you'll find:

Code:

// The following assigns all _common_ variables that may be used at any point in a template.$template->assign_vars(array('SITENAME'=> $config['sitename'],'SITE_DESCRIPTION'=> $config['site_desc'],
Something like this:

Code:

// SQL or some other method to obtain values and assign variables.// The following assigns all _common_ variables that may be used at any point in a template.$template->assign_vars(array('DONO_VALUE'=> $dono_value,'DONO_PERCENTAGE'=> $dono_percentage,'DONO_TARGET'=> $dono_target,'SITENAME'=> $config['sitename'],'SITE_DESCRIPTION'=> $config['site_desc'],

Statistics: Posted by thecoalman — Thu Dec 26, 2024 10:06 pm



Viewing all articles
Browse latest Browse all 2220

Trending Articles