View Single Post
  #5  
Old 05-09-2007, 05:01 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: Product Title - How to make it italic?

at first i thought you could use html tags for the title, but apparently not

but i found a simple way around this and that is to manipulate strings using smarty

in product.tpl look for
Code:
{include file="dialog.tpl" title=$product.producttitle content=$smarty.capture.dialog extra='width="100%"' productpage}
and replace with
Code:
{include file="dialog.tpl" title=$product.producttitle|replace:"#i#":"<i>"|replace:"#/i#":"</i>" content=$smarty.capture.dialog extra='width="100%"' productpage}



in products.tpl or products_t.tpl, depending if you use the default column setup or not, look for
Code:
<a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}{if $featured eq 'Y'}&amp;featured{/if}"><font class="ProductTitle">{$products[product].product}</font></a>
and replace with
Code:
<a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}{if $featured eq 'Y'}&amp;featured{/if}"><font class="ProductTitle">{$products[product].product|replace:"#i#":"<i>"|replace:"#/i#":"</i>"}</font></a>



and in the admin section when adding products, for the title name put #i# and #/i# as the open and closing of the italicized tags
(similar to <i> and </i>)

so in your example you type in: #i#Rosa gallica#/i# Complicata

the admin section will still show the #i# and #/i# however, which you can always mod as well using the replace as above


you have to edit bread crumbs and html title, but have it replace it with a null string rather than the italics for this case, as well (and whatever else that uses product title), but i cant think off the top of my head which tpl's these correspond to
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote