Jump to content

Displaing images in categories


Recommended Posts

Guest besimtari
Posted

How can we madofied the viewCat.tpl file to be able to display the text under the image instate on line with?

Guest twisted
Posted

In viewCat.tpl, find about line 26:

  <!-- BEGIN: products -->

  <tr>

    <td align="center" class="{CLASS}"><a href="index.php?act=viewProd&amp;productId={PRODUCT_ID}" target="_self">{IMG_PROD_THUMB}</a></td>

    <td valign="top" class="{CLASS}"><a href="index.php?act=viewProd&amp;productId={PRODUCT_ID}" target="_self" class="txtDefault"><strong>{TXT_TITLE}</strong></a><br />

        {TXT_DESC}<div class="txtOutOfStock">{TXT_OUTOFSTOCK}</div></td>

        <td align="center" class="{CLASS}">{TXT_PRICE}


and change it to:


  <!-- BEGIN: products -->

  <tr>

    <td align="center" class="{CLASS}"><a href="index.php?act=viewProd&amp;productId={PRODUCT_ID}" target="_self">{IMG_PROD_THUMB}</a><br><a href="index.php?act=viewProd&amp;productId={PRODUCT_ID}" target="_self" class="txtDefault"><strong>{TXT_TITLE}</strong></a></td>

    <td valign="top" class="{CLASS}">

        {TXT_DESC}<div class="txtOutOfStock">{TXT_OUTOFSTOCK}</div></td>

        <td align="center" class="{CLASS}">{TXT_PRICE}

Guest besimtari
Posted

Thank you very much! It is not that I asked. I know is in this codes:

<!-- BEGIN: sub_cats -->

<div id="subCats">

        <!-- BEGIN: sub_cats_loop -->

        <span class="subCat">

                <a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault"><img src="{IMG_CATEGORY}" border="0" alt="{TXT_CATEGORY}" /></a>

                <a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS})

        </span>

        <!-- END: sub_cats_loop -->

</div>

<!-- END: sub_cats -->

... but I don't know how can I write so the text (Category name) to be right under the image off the category and not in line with.

Guest twisted
Posted

Sorry....perhaps if you had made it clearer in your original post that you meant the CATEGORY image and text.

Same file, line 9...

Add a <br> at the end of the line.

[after "alt="{TXT_CATEGORY}" /></a>"]

Guest besimtari
Posted

Thank you again. I shold had told you I have try that, but did not work, all categories came in one column the same when I used a table.

  • 3 weeks later...
Guest fiveboys
Posted

same with me :unsure: the category text wraps around the window and ends up very untidy.

I have tried adding a break <br> at the end of that line and it gets worse.

The category text under the category image would be a big help, does anyone know how to do this or has successfully managed to do this?

Posted

shouldn't you be using

</ br> (or try <br />) instead of <br> since it is xhtml ??

Guest fiveboys
Posted

many thanks Mobie that seems to have done the trick for me, not sure if it was the change of tag or the position on the page I put it in but its working now so I am happy :innocent:

However putting it after the image part of the code didnt work so I played about a little and got it sussed.

For anyone still having problems heres the snippet from my viewcat tpl file

<!-- BEGIN: sub_cats_loop -->

<span class="subCat">

<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault"><img src="{IMG_CATEGORY}" border="0"

alt="{TXT_CATEGORY}" /></a>

<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a>({NO_PRODUCTS})<br />

</span>

<!-- END: sub_cats_loop -->

I hope this helps, my categories are all listed in ojne single collumn now all I need to do is find how to change the different row colours ...will look thru these forums and see if I can suss it.

Thanks agai

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...