Hello David,
This is my config.php
{code saved}
On my productpage i have this line:
<p>Bekijk <a href='<?php print $config_baseHREF."merchant/".tapestry_hyphenate($product_main["merchant"]);?>/'>hier</a> het complete<?php print $config_subsubonderwerp ; ?> assortiment van <a href='<?php print $config_baseHREF."merchant/".tapestry_hyphenate($product_main["merchant"]);?>/'><?php print $product_main["merchant"]; ?></a></p>
I want to place a word behing my productname like this:
<h1><?php print $product_main["name"]; ?><?php print $config_onderwerp ; ?></h1>
Where onderwerp must be the category of the product. I want arrange it in the config.
But when i do it like this:
$config_title = "example.com";
$config_onderwerp = "$product_main["category"]";
it isn't working.
Thanks Jan Roel
Yes but i setup this
<?php
print $config_onderwerp ;
?>
$config_onderwerp = "special word";
and i'd like to have the ability to add manually : $config_onderwerp = "$product_main["category"]";
Do you understand me?
Hello Jan,
I'm not sure I completely understand I'm afraid but it sounds like it would be sensible to have your custom config value as the fixed version, so it will be displayed anywhere that you wish to use;
<?php
print $config_onderwerp ;
?>
But for your product pages, use the alternative versions of your code that I posted above using $product_main["category"] instead of $config_onderwerp.
Let me know if you're still not sure and I'll try and help out further of course...
Cheers,
David.
--
PriceTapestry.com
Hello Jan,
Rather than edit config.php at all, you can simply pick-up the category name from the $product_main variable e.g.
$product_main["category"]
So in your first block of code from product page, have a go with:
<p>Bekijk <a href='<?php print $config_baseHREF."merchant/".tapestry_hyphenate($product_main["merchant"]);?>/'>hier</a> het complete<?php print $product_main["category"]; ?> assortiment van <a href='<?php print $config_baseHREF."merchant/".tapestry_hyphenate($product_main["merchant"]);?>/'><?php print $product_main["merchant"]; ?></a></p>
And for your H1 tag:
<h1><?php print $product_main["name"]." ".$product_main["category"]; ?></h1>
Hope this helps!
Cheers,
David.
--
PriceTapestry.com