Checking for the current category

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-07-2007, 04:04 PM
Casual Pligger
 
Join Date: Oct 2007
Posts: 38
I'm very new to pligg and I was looking through the class files trying to find what method or object I could use to get the current category of a story page so I can target my ads better. Well thats a lot of code to read through so I'm asking for assistance here. For example, here is what I would like to do

Code:
switch ($object->category)
{
      case "cat1":
            //show related ad
      break;

      case "cat2":
            //show related ad
      break;
}
so what I am asking is how can I get the category so I can compare it?
Reply With Quote
  #2 (permalink)  
Old 10-09-2007, 06:33 PM
New Pligger
 
Join Date: Sep 2007
Posts: 3
The following should give you what you are looking for.
$request_category
Reply With Quote
  #3 (permalink)  
Old 10-10-2007, 03:04 PM
Casual Pligger
 
Join Date: Oct 2007
Posts: 38
thanks for the reply but I figured it out a few days ago after posting this. I'm using $link->category to get the category id number.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control of meta description - categories Divisive Cotton Questions and Comments 71 03-29-2011 10:03 PM
Pligg Categories Yankidank Wiki Articles 1 12-17-2008 11:10 AM
How to show category keywords as text on the site? gnalkit Questions and Comments 4 11-26-2008 06:17 AM
get current category id mrgekko Questions and Comments 6 09-11-2008 11:58 AM
get current category id mrgekko Questions and Comments 0 07-29-2008 07:18 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development