Announcement

Collapse
No announcement yet.

image in product list and product list only part displayed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    image in product list and product list only part displayed

    Hi,

    I have checked the resources but am stuck

    Can anyone offer advice on how to have a small image displayed next to the product list and a thin line separating each listing as shown on this mock site http://www.reddragondesign.info/kbb/mock1.html and if it is possible to only display part of the product list on different pages......i.e the site has 3 main headings, Teka, Kuppersbutch and special offers but I only want to display the products for the section, in the mock page it is displaying only the Teka products......does that make sense?

    many thanx if anyone can help or point me to some resources

    Kind regards

    John

    #2
    This will give you the basic list of child sections with a faint line effect, you should be able to improve the spacing by applying a css style

    In the head section of the Page template
    Code:
    <!--@act NETQUOTEVAR:CHILDSECTIONS_RAW-->
    
    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!--
    function SectionList(ar){
    var strIDs = '';
    for (var i=1;i<=ar.length;i++){
    	if (ar[i].sURL !=null){
    		strIDs += '<a href="' + ar[i].sURL + '">' + ar[i].sName + '</a><br />';
    		strIDs += '<font color="#cccccc" size="-3">_________________</font><br />'
    		{
    	if (ar[i].pChild){
    		for (var j=1;j<=ar[i].pChild.length;j++){
    			if (j <= ar[i].pChild.length){
    				strIDs += '<br />';
    			}
    			}
    			}
    		}
    		}
    	}
    strIDs += '<br />' 
    return strIDs
    }
    //-->
    </SCRIPT>
    and in the body where you want the list to appear
    Code:
    <script language=Javascript1.1>
    document.write(SectionList(child_sections))
    </script>
    wrap that entire code section in a <span class=" "> </span> once you have defined the css class to control the line spacing.

    does that help?
    Bill
    www.egyptianwonders.co.uk
    Text directoryWorldwide Actinic(TM) shops
    BC Ness Solutions Support services, custom software
    Registered Microsoft™ Partner (ISV)
    VoIP UK: 0131 208 0605
    Located: Alexandria, EGYPT

    Comment


      #3
      Hi Bill,

      Thank you for the code, it works great just wondered if you knew if I can put a small image next to each item in the product list? and if you can how you do this

      thank you again for your help

      kind regards

      John

      Comment


        #4
        If you want the same image on every line, it is relatively easy, just a case of prepending the required html <img> tag with all the details. Different images - you need Norman or someone who actually knows javascript.

        For an image called smallarrow.gif the code would become
        Code:
        strIDs += '<img src="smallarrow.gif" alt="highlight">'+'<a href="' + ar[i].sURL + '">' + ar[i].sName + '</a><br />';
        make sure that all stays on one line.
        Bill
        www.egyptianwonders.co.uk
        Text directoryWorldwide Actinic(TM) shops
        BC Ness Solutions Support services, custom software
        Registered Microsoft™ Partner (ISV)
        VoIP UK: 0131 208 0605
        Located: Alexandria, EGYPT

        Comment


          #5
          Hi Bill,

          Many thanx for your reply, I kind of have it working......it shows the image however when I put the code in each product in the product list is listed twice.

          Have tried putting the code into different places with differing results..Ive a feeling Im putting the code into the wrong place

          Please can you tell me where I should insert the code as I have tried it in this area, each time making sure it is on one line

          for (var i=1;i<=ar.length;i++){
          if (ar[i].sURL !=null){
          strIDs += '<a href="' + ar[i].sURL + '">' + ar[i].sName + '</a><br />';
          strIDs += '<font color="#cccccc" size="-3">_________________</font><br />'

          thank you again for your help

          Kind regards

          John

          Comment


            #6
            erm....I've just realised what I have done!!....pasting the same code twice would have the products list twice!! all working....many thanx again for your help

            Kind regards

            John

            Comment

            Working...
            X