Cool! Thanks so much. That's exactly what I needed. =)
On Jun 21, 7:58 pm, Owen Winkler <[email protected]> wrote: > insidertravels wrote: > > Is there a way to use a conditional according to whether or not a post > > has a certain tag attached to it? For instance, all posts tagged > > "video" would execute the template snippet contained within the > > conditional? This would be similar to how WordPress does if(in_category > > ('')) or if(has_tag('')). > > All posts in Habari are Post object instances. The tags property of the > Post object is an array of tags that are associated to the post. > > The key of the array is the tag slug, the value of the array is the tag > text. > > So, to skip to the end: > > if(isset($post->tags['my-tag'])) : // if the post has the tag "my-tag" > > Owen --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/habari-dev -~----------~----~----~----~------~----~------~--~---
