Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

How to combine two category_id's

How to combine two category_id's

Hi There,
how do you combine the 2 following statements:

if (
$option == 'com_zoo'
and JRequest::getVar('category_id') == '4'
and JRequest::getVar('task') == 'category'
) return 306;

if (
$option == 'com_zoo'
and JRequest::getVar('category_id') == '21'
and JRequest::getVar('task') == 'category'
) return 306;

The 2 category_id's are different and I wanted to put them in one statement if possible.

Thanks in advance

David

drthorogood
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: How to combine two category_id's

Code:

if ( 

  $option == 'com_zoo'
  and (JRequest::getVar('category_id') == '4' or JRequest::getVar('category_id') == '21' )
  and JRequest::getVar('task') == 'category'
) return 306;

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: How to combine two category_id's

Thanks Stephen

drthorogood
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10734
Newest User:
gudad2
Members Online:
3
Guests Online:
216


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked