Using Checkbox to display different blog items

alt=
adanhash
@famegroup
8 years ago
15 posts
Hi Jamroom,
Can somebody help me out as im alittle confused. What i am trying to achieve is that when a user creates a blog item he select if the blog will appear on his profile page or on the main page. So i created to checkboxes called blog_domestic and blog_global

Now when i use the jrlist function i need 2 functions and how will i add the search item in it

for the MAIN PAGE will i search like this to display all profiles that want there news items to appear on the main page?

jrCore_list module=jrBlog profile_id=DOLLAR_profile_id search1=blog_global == yesorder_by=blog_display_order numerical_asc template=item_global.tpl pagebreak=8 page=DOLLAR_post.p pager=true

and only show user profiel page it will be
jrCore_list module=jrBlog search1=blog_publish_date DOLLARsmarty.now search2= blog_domestic == yes order_by="blog_publish_date desc" pagebreak=10 page=DOLLAR_post.p pager=true

is this correct?
updated by @famegroup: 05/08/16 07:12:18AM
paul
@paul
8 years ago
4,333 posts
For the main page, use this -
{jrCore_list module="jrBlog" search="blog_global = on" order_by="blog_display_order numerical_asc" template="item_global.tpl" pagebreak=8 page=$_post.p pager=true}
then for the profile page, use this -
{jrCore_list module="jrBlog" search1="blog_publish_date >= `$smarty.now`" search2="blog_domestic = on" order_by="blog_publish_date numerical_desc" pagebreak=10 page=$_post.p pager=true}
Hope that helps


--
Paul Asher - JR Developer and System Import Specialist

Tags