![]() |
Parsing Smarty Tags in Extra Fields
Is there a way to parse Smarty tags in extra fields? I went to the product.tpl file in skin1/modules/Extra_Fields and changed
Code:
{$extra_fields[field].field_value} to Code:
{eval var=$extra_fields[field].field_value} but it just kept the field from displaying at all. I want to have a manufacturer extra field that would be a link to the manufacturer's page of products (like thay do at Amazon, etc.) The link would be the same as clicking on the manufacturer's name in the Manufacturers menu. I know I could just do a regular HTML link with the actual URL, but using variables would save me from having to look up the ID each time and would also prevent mistakes. I'm not a Smarty expert so I don't know what else is involved. I just looked at the pages.tpl file under skin1/customer/main because I know we have the option of parsing Smarty tags in embedded static pages. I'm thinking something needs to be captured in addition to the eval. If anyone has more expertise in Smarty templates and might know how to make this happen, I'd really appreciate it. Thanks, Jill |
Re: Parsing Smarty Tags in Extra Fields
Moving to the Template Editing forum
|
Re: Parsing Smarty Tags in Extra Fields
Sorry I placed my post in the wrong spot...
It turns out adding eval was working. I was just over-complicating and not placing the correct information between my link tags :oops:, so I was just seeing a blank space. All I had to do was place this in the extra field: Quote:
and make the change to skin1/modules/Extra_Fields/product.tpl that I mentioned above. I placed the if else statement in case I forget and place this code in the Manufacturer extra field of a product for which I haven't specified a manufacturer. I may instead place an if statement in the Extra_Fields/product.tpl to have it not display the field at all if $product.manufacturerid = 0. Jill |
All times are GMT -8. The time now is 01:41 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.