Quote:
Originally Posted by testebr
hook: process_templates_complete
code: $footer .= 'text added to footer';
|
Indeed, you can manipulate the already rendered template doing this. Also possible is str_replace:
PHP Code:
$search = "Terms of Service";
$replace = "Terms of Cooking Noodles";
$footer = str_replace($search,$replace,$footer);
Although this is a somewhat bad example, since "Terms of Service" is a phrase, of course, and will vary by language. Always make sure you use strings for replacement that are always present.
Attachment 106372
Using str_replace, you can also add stuff in the middle of the template like so:
PHP Code:
$search = "Terms of Service";
$replace = " and Terms of Cooking Noodles";
$footer = str_replace($search,$search.$replace,$footer);
Attachment 106374