What is the best method of styling the users list page.开发者_开发技巧 I'd like the change the layout and styles of the users view. What's the best way to do this?
Instead of trying to alter the layout and styling of an existing user list in drupal (I assume you mean admin/user/user), why not create a whole new one specifically aimed at your requirements?
Views has the ability to loop around users of your site, and can create the output in a table, or an unordered list - you can choose.
Views is easily themable as you can override .tpl.php files to alter the markup, and CSS styling can be used to alter the presentation.
- Create a new theme following the first paragraph from this drupal link, http://drupal.org/node/11819, naming it jones as an example
- In your new theme directory, open your template.php file
- Copy the exact code from http://api.drupal.org/api/drupal/modules--user--user.admin.inc/function/theme_user_admin_account/6 into your template.php page
- Rename the theme_user_admin_account to have the name of your theme, jones_user_admin_account
- Update the generated HTML for the user admin account page here to what you desire. An easy way to add divs is to use the prefix and suffix form API functions.
- Now that you have control over the html for the user table, you can style through CSS as you see fit.
精彩评论