Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding a line break to product title

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-27-2009, 04:35 AM
 
joannet joannet is offline
 

Senior Member
  
Join Date: Mar 2006
Posts: 105
 

Default Adding a line break to product title

Is it possible to add a line break to a product title via admin?

I want product titles to look neat and would like to be able to add a <br> to a product's name.

Can anyone please advice?

Thanks
__________________
/joannet/
X-Cart version 4.1.9 and above
Reply With Quote
  #2  
Old 04-28-2009, 07:09 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default Re: Adding a line break to product title

You can modify the /skin1/customer/main/product.tpl via the admin edit templates, search from the product-title and add a </ br> line-break.
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #3  
Old 04-28-2009, 07:12 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Adding a line break to product title

I think they mean adding a break in the actual title, which isn't possible as the product name can't accept html.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 04-28-2009, 07:42 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default Re: Adding a line break to product title

How about possibly modify somehow to have after x letters line-break in the template?
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #5  
Old 04-28-2009, 11:25 AM
 
joannet joannet is offline
 

Senior Member
  
Join Date: Mar 2006
Posts: 105
 

Default Re: Adding a line break to product title

Thanks for your responses.

Yes, I am referring to the actual product title.

Is there a way to have it wrap after a certain number of characters, if html is not possible here?
__________________
/joannet/
X-Cart version 4.1.9 and above
Reply With Quote
  #6  
Old 04-28-2009, 11:43 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default Re: Adding a line break to product title

you can truncate the product title after a number of characters, this would be like "product tit..." so you would miss some letters. Otherwise there could be a smarty template method to achieve this
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #7  
Old 04-28-2009, 11:45 AM
 
joannet joannet is offline
 

Senior Member
  
Join Date: Mar 2006
Posts: 105
 

Default Re: Adding a line break to product title

Sounds great. Any idea of the code to use?
__________________
/joannet/
X-Cart version 4.1.9 and above
Reply With Quote
  #8  
Old 04-28-2009, 02:10 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Adding a line break to product title

Maybe you could try putting the title in a fixed container width - then it will break when it does not fit in the container. Something like:

<div style="width:150px;">
<h2>This is a test title - if it does not fit in this div width - it will break to a new line</h2>
</div>
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #9  
Old 04-28-2009, 02:21 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Adding a line break to product title

^ Fixed div is the way to go.
Reply With Quote
  #10  
Old 04-28-2009, 11:30 PM
 
joannet joannet is offline
 

Senior Member
  
Join Date: Mar 2006
Posts: 105
 

Default Re: Adding a line break to product title

Thanks a lot.
__________________
/joannet/
X-Cart version 4.1.9 and above
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:32 PM.

   

 
X-Cart forums © 2001-2020