09-22-2017, 02:10 PM
On my site there are various ways to share content via Facebook, etc. To do this correctly, Facebook needs the og:* meta tags in the page header. In UserSpice, these are provided globally in usersc/includes/head_tags.php. I need these locally, as they will be different for each page depending on the shared content.
One way I've come up with is to define a global array before head_tags.php gets pulled in, and reference that global array in head_tags.php to produce them. That will almost certainly work, but it seems like there should be a cleaner way that I'm just not seeing.
What is the correct way to set this on a page-by-page basis in UserSpice instead of using static content in head_tags.php?
One way I've come up with is to define a global array before head_tags.php gets pulled in, and reference that global array in head_tags.php to produce them. That will almost certainly work, but it seems like there should be a cleaner way that I'm just not seeing.
What is the correct way to set this on a page-by-page basis in UserSpice instead of using static content in head_tags.php?