Question on creating an array using a custom profile field.

SeanChaney
SeanChaney
@seanchaney
8 years ago
58 posts
Hello, I would like to create an array from a custom profile field I have created and I'm a bit stuck trying to find info. I created a custom profile field named pofile_type that I as an admin controls. I would like to pull an array using the keywords I would put into that field to list profiles with that keyword.
Thanks for any help!
updated by @seanchaney: 01/09/17 07:27:16PM
SteveX
SteveX
@ultrajam
8 years ago
2,584 posts
Into your link to the page you can add /type=punk

Then in your skin template use jrCore_list:
{jrCore_list module="jrProfile" order_by="_item_id desc" search1="profile_active = 1" search2="profile_type = $_post.type" limit="5"}

That will list the 5 least recently created active profiles which you have marked as punk


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 10/07/16 12:19:10PM
SeanChaney
SeanChaney
@seanchaney
8 years ago
58 posts
Thanks for the reply ultra Jam!
Is it ok to use the above code using Page builder Code template widget. I tried the above code using page builder and it seemed not to work. I am using Jamroom 6 Follow me skin. FYI I am returning to Jamroom after years of not using it basically I am a newbie again relearning Jamroom, Smarty, and templates.
michael
@michael
8 years ago
7,721 posts
That code is "template code", so it will work in any .tpl file, or inside the Template Code widget.

The equivalent non-code Site Builder way to do it would be to use the 'Item List' widget with the same parameters.

Docs for that code is here:

Docs: "{jrCore_list}"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/89/jrcore-list

Its used a lot in the skins for generating lists of stuff.
SeanChaney
SeanChaney
@seanchaney
8 years ago
58 posts
Thanks for you help this worked for me.
{jrCore_list module="jrProfile" order_by="_created desc" search1="profile_active = 1" search2="profile_type = drumset" limit="5" require_image="profile_image"}

Tags