Filtering pageList by Topic

Permalink
I need to make one page template called "products". Inside this page template there is a topic attribute that allows you to select a topic for the page, so in this case they are product categories.

I need to create a page list that first grabs all the products (I got that part done), but then filters it down even further based on the topics selected.

I have a product category page template that makes a page list of all product page types. Inside the product category page template, you can also select the topics for that should be shown on the product category page.

Is this the correct way to go about this? I'm trying to pull the topic attributes selected on the product_category page, which has a built in page_list filtering grabbing all product page types. The product page types all have category topics selected. The product_category page needs to filter its page_list by matching the topics.

ob7dev
 
ob7dev replied on at Permalink Reply
ob7dev
I'm trying to filter pagelist by topic. I'm first grabbing the topic_attribute set up on the page type:
$topics = $c->getAttribute('product_categories');

Then I'm trying to filter my pageList by it:
$pageList->filterByTopic($topics);

But theres no results.
Even though I can print out the array of topics and see they are there:
$topics_display = $c->getAttribute('product_categories','display');

but my pageList item does not return anything. If anyone can help me with this it would be greatly appreciated, as I've been trying to figure this out all day, and would like to spend the weekend learning how to use emacs with vim rather than finishing up work that's suppose to be done before I leave work today. THANKS!