Drupal 5.1. I have a section where my musicians create their own profile. The default Name field is the musician's name. Now I have a problem sorting them by last name.
I then relabeled Name field to Last Name, and added a new field called First Name. Now the title is only Last Name. I have played with Contemplate but to no avail.
What is the best solution to this problem?
My solution to this type of problem, (which I think is fairly common) is to use the CCK Fullname field for the name, and use contemplate to theme the node view to use this for display (and you can use views to sort via the last name only field, and then use Node Autotitle to generate the title for the node (used internally, or you can use this for actual display and use the fullname field just for sorting (and leave it hidden in the theme layer.
http://drupal.org/project/cck_fullname http://drupal.org/project/auto_nodetitle
When configured, you can use a snippet of PHP in the auto_nodetitle field something like the one below to get the fullname into the node's title, and you can use auto_nodetitle to hide the title form on the node creation page as well.
<?php global $form_values; $node = (array)$form_values; $name = $node['field_full_name']['0']; print $name['first'] .' '. $name['last']; ?>
Hope that helps
-Michael
On Jul 5, 2007, at 9:02 AM, A-NO-NE Music wrote:
Drupal 5.1. I have a section where my musicians create their own profile. The default Name field is the musician's name. Now I have a problem sorting them by last name.
I then relabeled Name field to Last Name, and added a new field called First Name. Now the title is only Last Name. I have played with Contemplate but to no avail.
What is the best solution to this problem?
--
- Hiro
Hiroaki Honshuku, A-NO-NE Music, Boston, MA http://a-no-ne.com http://anonemusic.com
-- [ Drupal support list | http://lists.drupal.org/ ]
__________________ Michael Prasuhn mike@mikeyp.net http://mikeyp.net 714.356.0168
Michael Prasuhn / 2007/07/05 / 04:14 PM wrote:
and you can use views to sort via the last name only field,
Thank you so much, but I am not seeing how to do this. The sort criteria I see is only field_full_name, and can't figure this out to sort by last name.
Since it won't take non ASCII value, I am going to use this only for sorting but not to display. I just need to understand how to sort by last name. I don't suppose I need contemplate hacking, but should work from Sort Criteria, yes?
Anyone here use the Send module?
There is very little documentation for the Send module, and nothing I could find on how to access or setup the views functionality.
I didn't see any predefined views in my admin panel specific to the send module, so I added a view. Fortunately, some of the send module specific filters and arguments appeared in the pulldown.
However when I try to access the view using the url I created view/send, I get the following error:
Fatal error: Call to undefined function _send_views_arg_module() in views.module on line 1413
Anyone familiar with this module and could provide some insight?
many thanks, brian