Skip to main content

Pull profile info based on tags, outside of Directory pages?

I have a scenario, on our custom theme, where I want to display members of our nation who are authors, but I need to do it programmatically on a template, as opposed to using a Directory page.

A basic example: authors are tagged with "purple_group"

`{% tag "purple_group" with "author_meta" %}`

... with an _author_meta.html template giving you some quick meta info for an author.

If I attempt this, I get the NationBuilder error 

`Liquid error: undefined method `gsub' for nil:NilClass`

I have tried a few things, and I'm beginning to wonder whether its actually even possible to display profile info outside of 1) profile pages in NationBuilder, 2) Directory pages, 3) Author functions attached to a blog post. 

Here's my scenario, if this helps anyone understand why I'm trying to pull profile info onto a front facing page that is not a Profile or Directory page, or just using the Author field. I'm attempting to add multiple authors to a blog post, which NB doesn't handle with its one-author only Author field.

Using tags, I'm able to get pretty far in displaying multiple author names on posts and linking them to the public profiles of the authors (which I will make a blog post about sometime). But, I have a need to display meta data from profiles of authors at the bottom of a blog post, not just their names, when profiles and blog posts have matching "author tags."

So the authors and blog posts have the same tags... but I can't seem to pull profile info based on this with any of the "subpage" methods, including tags. 

Official response from

Luke's answer here is likely the best solution. The {% tag %} method won't work because that refers to page tags, which are different than people tags. Using the {% subpage %} method will be the only way to do this but will require that you have public profiles enabled in your nation.

Share this post

Showing 3 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.