Announcement

Collapse
No announcement yet.

Set number of products per page.

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

    Set number of products per page.

    Know the ability to limit the amount of products per page has been on the wishlist for a while, however the only searches I could find relating to this are pre 9.

    Has this feature been added?

    #2
    no it hasn't and it is unlikely to be due to the static page setup of actinic.

    dividing into smaller sections and using the code from the AUG for next/previous is the only current solution

    Comment


      #3
      This code might help you out
      Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22ContentCategory%22%20%2f%3e%20%3d%3d%20%22Landing%20Page%22%20%26%26%20strlen%28%3cactinic%3avariable%20name%3d%22Disability%22%20%2f%3e%29%3e0" >
      	<actinic:block php="true" >
      		$itemno = 0;
      		$disability = '<actinic:variable name="Disability" encoding="perl" selectable="false" />';
      	</actinic:block>
      	<table class="product_list"><tr>
      	<actinic:block type="EntireSectionList" >
      		<actinic:block type="ProductList" >
      			<actinic:block php="true">
      				if ($itemno < 6 &&
      					stristr('<actinic:variable name="DisabilityList" encoding="perl" selectable="false" />', $disability))
      				{
      					echo "<td>";
      					echo '<actinic:variable value="Tiny Product" name="ProductLayout" encoding="perl" />';
      					echo "</td>";
      					++$itemno;
      					if (($itemno % 3) == 0)
      					{
      						echo "</tr><tr>";
      					}
      				}
      			</actinic:block>
      		</actinic:block>	
      	</actinic:block>
      	</tr></table>
      </actinic:block>
      It outputs the first 6 products, using a custom layout (Tiny Product) where the DisabilityList variable contains the text in the Disability variable. Whether you could build paging on top of this is another matter.

      Comment


        #4
        You can control the number of products listed far easier using the ListIndex variable to count the number displayed. But still that will not generate new sections (pages) with the balance.

        There is a post from Fergus with page tabs which may be worth checking out .. also as a free download on his site.


        Bikster
        SellerDeck Designs and Responsive Themes

        Comment


          #5
          Ah yes. In my filtered keyword case listindex didn't work as it counts the unfiltered items.

          Comment


            #6
            Did you try running it through twice ... once for the keyword and then for the list? Although the time to compile could be a swine


            Bikster
            SellerDeck Designs and Responsive Themes

            Comment


              #7
              No, coming from a traditional programming background that particular process didn't really occur to me. Now it's working I'm not going to change it either!

              Comment


                #8
                Indeed - if it is not broke do not change it.... particularly with Actinic.

                The beauty of Actinic v8 onwards is that there are typically many routes to the same effect, especially since the introduction of PHP integration and some very neat variables.


                Bikster
                SellerDeck Designs and Responsive Themes

                Comment

                Working...
                X