Showing Author on List Page

9 posts by 4 authors in: Forums > CMS Builder
Last Post: January 28, 2010   (RSS)

Re: [kevbarker] Showing Author on List Page

By gkornbluth - November 8, 2009

Thanks Kevin,

Great find!

Looks like the user's full name might just do the trick, and even better than I thought I could.

I try it tomorrow and see where it goes.

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] Showing Author on List Page

By Dave - November 11, 2009

We actually have this build in now.

Try: <?php echo $record['createdBy.fullname'] ?>

It loads the record of the "owner" from createdByUserNum and adds all those fields with a "createdBy." prefix.

Hope the makes sense. Let me know if it works for you. (If it doesn't attach your viewer).
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Showing Author on List Page

By gkornbluth - January 21, 2010

H Dave,

My client pointed out something that was an issue for him and possibly for others.

When a user account is created, the user's full name gets entered, but it's in the format First name Mi Last name. (especially if you're using the <?php echo $record['createdBy.fullname'] ?> function.

When there's a long list of users, they then get listed in the user name list sorted by first name, which he feels isn't the optimal way to sort an alphabetized list of users.

Is it possible to:

1) Add a First Name and a Last Name field to the user account table.

2) Get rid of (or optionally hide) the full name field for new user accounts without messing up some inner workings and existing user accounts during the conversion, and

3) Not lose the functionality currently provided by the <?php echo $record['createdBy.fullname'] ?> function by echoing both the First name and the Last name fields in the viewer?

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] Showing Author on List Page

By Chris - January 27, 2010

Hi Jerry,

You can certainly replace the fullname field with other fields in the accounts table. You can then output both fields in your viewer:

<?php echo $record['createdBy.first_name'] . " " . $record['createdBy.last_name'] ?>

I hope this helps. Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Showing Author on List Page

By gkornbluth - January 27, 2010

Thanks Chris,

I'll certainly add these fields to my user accounts table.

Would there be anything that would have to be customized each time that I upgrade a client to a new version of CMSB?

Has anyone else mentioned this issue?

It might prove to be more flexible for developers if a "first_name mi last_name format was added as a built in option.

I guess. any switch would have to accommodate both formats, since full name is what we've become used to.

Best,

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] Showing Author on List Page

By Chris - January 28, 2010

Hi Jerry,

Nope, nothing will need to be changed when you upgrade. There are no hardcoded references to the fullname field, it's just a default.

I haven't heard of this issue before, but that doesn't mean it hasn't come up. Balancing simplicity and flexibility can be tricky.
All the best,
Chris

Re: [chris] Showing Author on List Page

By gkornbluth - January 28, 2010

Thanks Chris.
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