Pagebreak Documentation
Suggestions
Oh Cool! That deffinatly works for me.
What I was reffering to however was this:
I was thinking of something for a beginner just getting started coding their Jamroom. Wrote so simple a child could follow along.
** now this is just an example and ive had a long day so forgive me if theres a ton of errors here...
Something like:
{jrCore_list module="jrProfile" order_by="_created desc" search1="profile_active = 1" template="index_list_profiles.tpl" limit="5" require_image="profile_image"}
Here is my example of the [jrCore_list] function breaking it down as it reads:
The first call is
which is the function we are calling. Its action will be to generate a list when executed.
Next we tell Jamroom where to look for the list. Since our goal here is to list 5 new active profiles we need use the jrProfile module. We have to tell Jamroom to look in the modules/jrProfile for profiles. So we type
We would like to list the returned result to show only 5 of the newest files.
so we tell Jamroom to "order_by"
and since we want it to list the newest 5 we need it "_created desc" which stands for created descending.
** [TIP] Consider "Order_by, Search1, limit, and require_image like filters on the return results of your list.
So far the code should look like this:
{jrCore_list module="jrProfile" order_by="_created desc"
ok from here we will call our search. We could call multiple searches "search1, search2, search3 ect. But to keep it simple we will just use one.
So our next piece of code we have to add is:
Search1="profile_active = 1"
* Heres a recap
so far we have requested that Jamroom returns to us with a list.
The jrCore_list is called and directing to the module jrProfiles expecting a return with the newest created desending profile. Also we want to make sure the profile is active. So we need to include "profile_active = 1".
Congradulations, now the list has filtered out only profiles that are currently active on Jamroom.
Now that we have the data we need we have to direct traffic here and tell Jamroom what to do with this data we have.
So next we will be including the location of our .tpl file which processes the returned data from jrCore_list.
template="intex_list_profiles.tpl"
Great! Currently the result will return all profiles that are active. We only want to see the last 5. So to achieve that you will have to tell Jamroom to limit the results
you do that by adding a limit filter. (I called this a filter, but im sure theres a better name for it)
Now only 5 profiles will be returned in the data sent to intex_list_profiles.tpl .
And last but not least we also want to require the returned results to have a picture. so we will add this filter here.
require_image="profile_image"
That's it! The jrCore_List Function broken down as Jamroom reads it.
Your final code should look like this:
{jrCore_list module="jrProfile" order_by="_created desc" search1="profile_active = 1" template="index_list_profiles.tpl" limit="5" require_image="profile_image"}
After writing all this I do understand it would take a lot of time so im not sure you could or would even do something like this. But it sure would help teach a lot more people and also could bring more people on board if it was laid out with instructions so even a child or teenager could follow along.
updated by @developer-networks: 11/12/13 01:12:51AM