X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Html tags in Category Description Help (https://forum.x-cart.com/showthread.php?t=22810)

lannyg 06-26-2006 06:13 PM

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.

balinor 06-27-2006 02:45 AM

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 :)

lannyg 06-27-2006 05:04 AM

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 :)

balinor 06-27-2006 05:08 AM

Get rid of the cellpadding and use valign="top" on the table cells.

lannyg 06-27-2006 05:20 AM

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.

balinor 06-27-2006 07:17 AM

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

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



with this:

{$current_category.description}

lannyg 06-27-2006 07:39 AM

That was it!
 
The mod you sent worked! THANK YOU

SamD 06-27-2006 08:51 AM

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 #-o . It's really fun to edit.

Maybe it shouldn't replace \n by default!

balinor 06-27-2006 08:53 AM

Well, it is meant for people who have no html knowledge so they can enter line breaks without having to code them.


All times are GMT -8. The time now is 08:49 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.