Adding list of records to “User” section

15 posts by 3 authors in: Forums > CMS Builder
Last Post: September 21, 2011   (RSS)

Is it permissible to add a list of records from another section to the “User” section without corrupting it? [/#000000]

[/#000000]

I would like to setup a listing page that will list records based on a choice from this list![/#000000]
nmsinc

Re: [nmsinc] Adding list of records to “User” section

Hi nmsinc,

Could you be a little more specific about what you're actually trying to do?

Thanks.

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Adding list of records to “User” section

By nmsinc - September 19, 2011 - edited: September 19, 2011

Hi Jerry,[/#000000]

[/#000000]

I have a listing page that I want to sort records based on a preference that I will set up in the USER section if it is permissible to do so. My concern is, I do not want to set this preference up if it will cause problems to the USER section![/#000000]

[/#000000]

Thanks[/#000000]

Ray[/#000000]
nmsinc

Re: [nmsinc] Adding list of records to “User” section

Hi Ray,

That shouldn't be a problem.

Do you mean sort ( which group of records displays first) or filter (Show different records for different groups of users)?

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Adding list of records to “User” section

Filter!
nmsinc

Re: [nmsinc] Adding list of records to “User” section

Hi Ray,

This is a fairly standard implementation of the website membership plugin.
http://www.interactivetools.com/add-ons/detail.php?Website-Membership-1012

Here's the excerpt from the readme for that plugin.

- You can access the current users login record in the $CURRENT_USER variable on
any page that calls viewer_functions.php. To see what fields are available use
this debug code: <?php showme($CURRENT_USER); ?>

- This allows you to show content based on the current users record values. For
example, if you had a user field called 'premium', and some users had that field
checked, you could show different content to them with this code:
<?php if ($CURRENT_USER['premium']): ?>
Only premium members would see this.
<?php endif ?>

The field in the user account record can be either a single value pull down or radio button list field.

That field can get its values (num) and labels (title) from another multi-record table that has only one field called "title" if that's more convenient. Just use the advanced options to get list values from database when you set up the list field in the user accounts editor and choose the 'num' field for option values and the 'title' field for option labels.

In your viewer, if you want to display the titles you'll have to add :label to the echo code. So if the list field in the 'accounts' table was called 'allowed' you'll have to add ['allowed:label'] or all you'll echo is the record number.

Hope that points you in the right direction.

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Adding list of records to “User” section

Hi Jerry,[/#000000]

[/#000000]

I have created a new field within the User Section and will populate it from values (num) from another multi-record table – see below:[/#000000]



Table(1) = records of “users” that now includes a choice from Table(2) value(num)



Table(2) = records of “company names and addresses”



Table(3) = records that include a choice from Table(2) value(num)



Using a listing page, how would I use the “Membership” plugin to restrict listing of records in Table(3) to those that only match the new field value(num) in Table(1)?[/#000000]



Thanks

Ray
nmsinc

Re: [nmsinc] Adding list of records to “User” section

Not sure, but have a look at this post

http://www.interactivetools.com/forum/gforum.cgi?post=61466#61466

It might give you some ideas.

There have been many posts on searches searches in multiple tables

There's also relatedRecords that are worth searching through.

Good luck,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Adding list of records to “User” section

By nmsinc - September 19, 2011 - edited: September 19, 2011

Hi Jerry,

That thread did not help - anyone else with any ideas?
nmsinc