Jump to content

blocktopmenu.php putting subcategory limit


blackwinds

Recommended Posts

i have categories but AUCTIONS category has more than 100 sub categories 

how can i limit this subcategories to 5 or 10 ?

 

my AUCTIONS category id is 25

i write this

 

             if (($category['id_category']) == 25){
                $html .= '<a href="/onceki-muzayedeler/">See all past auctions</a>';
            }
it works but how can i put a limit
has any one idea ? can i declear a limit but how ?
Edited by blackwinds (see edit history)
Link to comment
Share on other sites

i solve it 

may be someone need in future

for category 25 i put a variable and 

i modify the category list loop with if ($mycount++ < 4)

 

  if (($category['id_category']) == 25){
                $mycount==0;
            }
foreach ($categories as $key => $category)if ($mycount++ < 4) {
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...