Hi,
I recently start building a page with Fuel CMS. Now I am running into a problem. I created pages at site -> pages. Added some Tags after enabling the Tags Module and extending the backend view. For now everything is fine. Tags are also added to the page in the fuel_page_variables table.
Now my problem. I want to make a query for pages created that way having specific tags and display the recent pages with these tags.
Example:
page A) tags ( food, travel)
page
tags ( clothing)
page C) tags ( food)
Now I want to query all pages containing tags "food". Maybe easy, but I am stuck there.
tanks,
Christian
Comments
http://forum.getfuelcms.com/discussion/comment/6648#Comment_6648
$tag = $CI->fuel->tags->find_by_tag('food'); foreach($tag->pages as $page) : print_r($page->values()); endforeach;
thanks for your reply and sorry for the late reply/thank. I think I took care of all the steps. But when I call the foreach loop I get the following Error Message:
======================
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: core/MY_Model.php
Line Number: 5778
======================
In that file at that position I find this code:
$position = $rel_ids_flipped[$row->id];
A quick check shows that the array is present, but I get this error. But when I change the line to this:
$position = $rel_ids_flipped[$row['id']];
It works, but I don't know why. Since I don't want to change your code, do you have an idea? Maybe it's a bug.
thanks in advance,
Christian
public $record_class = 'Food_item'; // the name of the record class (if it can't be determined)
If no record class is found, it will default to an array which is what you are seeing.
I tried it, but it did not work out. Now I try it with a simple module. Maybe it was too advanced for a beginner like me. But anyway thanks for your support.
thanks a lot,
Christian
PS: the confirmation for the registration somehow is broken. I receive the message that the email successfully has been confirmed, but I keep getting the information to confirm my email address.
"You need to confirm your email address. Click here to resend the confirmation email."
I let the system send me the mail about three times so far, but no change.