Submitted by Leo on Wed, 2011-01-05 08:23 in Price Tapestry
Hi David,
On external you now have always the same title.
Is it possible on some way to show the title from external.php as title in wordpress?
Let say you click on a product page than you get the product title.
Thanks
Leo
In any instance of the external scripts they are generally always executed after page headers, meta tags etc. have been set and so there is not really any way to have control over them. However, what you can do is add a simple line of JavaScript to update the page title dynamically. To do this, look for the following code at line 2 of html/product.php:
Hi Leo,
In any instance of the external scripts they are generally always executed after page headers, meta tags etc. have been set and so there is not really any way to have control over them. However, what you can do is add a simple line of JavaScript to update the page title dynamically. To do this, look for the following code at line 2 of html/product.php:
<?php $mainProduct = $product["products"][0]; ?>
...and REPLACE with:
<?php $mainProduct = $product["products"][0]; ?>
<?php if ($external_path): ?>
<script type='text/JavaScript'>document.title="<?php print htmlentities($mainProduct["name"],ENT_QUOTES,$config_charset); ?>";</script>
<?php endif; ?>
Hope this helps!
Cheers,
David.
--
PriceTapestry.com