[Version 2] Profile Directives
Profiles are Raisely's bread-and-butter for any peer-to-peer fundraising campaign. Your supporters can create them, form teams and then fundraise on your behalf.
Our profile directives let you display information about your fundraising profiles in your templates. There's 4 directives to talk about here: profile listings, single profiles, search and blog posts.
Profiles
<profiles
type="individual"
search="john"
sort="total"
order="desc"
max="5"
heading="All Profiles"
count="myCount"
filters="{'public.country': 'Australia'}"
></profiles>
The <profiles>
directive renders a list of profiles, with a number of configurable options. In your theme templates, the rendered result is editable in the file Profiles/Profiles.
Attributes
type
optional / string
The type of profile to show. It can be "individual" or "group". Leaving it blank returns everything.search
optional / string
If you set this, it will return all profiles whose names contain that string.sort
optional / string
This can be "total" or "createdAt". If you're creating a leaderboard, you want "total".order
optional / string
The usual, just "desc" or "asc".max
optional / number
The total number of profiles to show. We do paginate after this number.heading
optional / string
A heading to show at the top of the list, if set.count
optional / variable
You can set a scope variable here and the directive will populate it with the total. This is for convenience so you can do something like this:<h1>Join {{totalFundraisers}} participating in the campaign</h1>
<profiles count="totalFundraisers" ng-hide="true"></profiles>
filters
optional / object
Allow results to be filtered by values in fields on the profile.expand
optional / string
A comma separated string of extra information to include. Can beparent,user
to include the full parent profile and profile owner.
Search
<search
init="true"
></search>
The <search>
directive lets you embed a search form and results anywhere in your theme. In your theme templates, the rendered result is editable in the file Search/Form. You can further customise your search form in the template itself to search through custom fields, and with pre-set values.
Attributes
init
optional / boolean
If set totrue
the search form will pre-load some results to show the user.
Posts
<posts
profile="johnday"
max="10"
></posts>
The <posts>
directive renders a list of profiles, with a number of configurable options. In your theme templates, the rendered result is editable in the file Post/Posts.
Attributes
profile
required / string
The profile ID to show posts from. This will default to the campaign.max
optional / number
Number of posts to show. Note: We don't currently paginate posts.