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

Html tags in Category Description Help

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-26-2006, 06:13 PM
 
lannyg lannyg is offline
 

Member
  
Join Date: Jun 2006
Posts: 23
 

Default Html tags in Category Description Help

Hello,

I have an img tag
Code:
[img]http://www.mysite.com/images/Akita.jpg[/img]

I'm placing it in the beginning of the category description, but it causes the template to look like this:
http://i70.photobucket.com/albums/i103/mikevid/Image13.jpg

I would like it to look like this:
http://i70.photobucket.com/albums/i103/mikevid/Image11.jpg
(I cheated and used
to make it look like that).

I think it has something to do with a div tag, however my html is not as good as it should be (lol).

Any ideas? ...Please

Thank you.
__________________
Version 4.0.18 [unix]
Reply With Quote
  #2  
Old 06-27-2006, 02:45 AM
 
balinor balinor is offline
 

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

Default

Easiest way is to create two table cells, one for the image and one for the description. Since you are using align="left", everything is going to wrap, as you have seen first hand
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 06-27-2006, 05:04 AM
 
lannyg lannyg is offline
 

Member
  
Join Date: Jun 2006
Posts: 23
 

Default Table suggestion to wrapping problem

Hello again,

I tried the table:
Code:
<table width="100%" border="0" cellspacing="0" cellpadding="10"> <tr> <td>[img]http://www.mysite.com/images/Afghan_Hound.jpg[/img]</td> <td> The.....

I get this result:
http://i70.photobucket.com/albums/i103/mikevid/Image1.jpg

It adds a lot of space above the picture as you can see by comparing to the other example in my previous post.

Is a CSS controlling tables in this, do you know?

Thank you again
__________________
Version 4.0.18 [unix]
Reply With Quote
  #4  
Old 06-27-2006, 05:08 AM
 
balinor balinor is offline
 

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

Default

Get rid of the cellpadding and use valign="top" on the table cells.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 06-27-2006, 05:20 AM
 
lannyg lannyg is offline
 

Member
  
Join Date: Jun 2006
Posts: 23
 

Default Removed padding on table

Hi,

As you suggested I got rid of the padding:
Code:
<table width="100%" border="0" align="top" cellpadding="0" cellspacing="0">

I got this result:
http://i70.photobucket.com/albums/i103/mikevid/Image2.jpg

Do you have any other ideas? ...and thank you again for your help

Regards.
__________________
Version 4.0.18 [unix]
Reply With Quote
  #6  
Old 06-27-2006, 07:17 AM
 
balinor balinor is offline
 

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

Default

In customer/main/subcategories.tpl, try replacing this:

{$current_category.description|regex_replace:"/[\n]/":"
"}



with this:

{$current_category.description}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 06-27-2006, 07:39 AM
 
lannyg lannyg is offline
 

Member
  
Join Date: Jun 2006
Posts: 23
 

Default That was it!

The mod you sent worked! THANK YOU
__________________
Version 4.0.18 [unix]
Reply With Quote
  #8  
Old 06-27-2006, 08:51 AM
  SamD's Avatar 
SamD SamD is offline
 

Advanced Member
  
Join Date: Mar 2006
Location: New York
Posts: 38
 

Default

Quote:
Originally Posted by balinor
In customer/main/subcategories.tpl, try replacing this:

{$current_category.description|regex_replace:"/[\n]/":"
"}



with this:

{$current_category.description}

Such a pain in the butt that thing. I used to have like 300 lines of code (an HTML table) all on one line . It's really fun to edit.

Maybe it shouldn't replace \n by default!
__________________
Version 4.1.8
(Upgraded from 4.0.1
Reply With Quote
  #9  
Old 06-27-2006, 08:53 AM
 
balinor balinor is offline
 

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

Default

Well, it is meant for people who have no html knowledge so they can enter line breaks without having to code them.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote

The following user thanks balinor for this useful post:
rvcapital (08-13-2009)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:34 PM.

   

 
X-Cart forums © 2001-2020