开发者

Best way to style the default users list page in Drupal

开发者 https://www.devze.com 2023-01-25 23:52 出处:网络
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 layo

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.


  1. Create a new theme following the first paragraph from this drupal link, http://drupal.org/node/11819, naming it jones as an example
  2. In your new theme directory, open your template.php file
  3. 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
  4. Rename the theme_user_admin_account to have the name of your theme, jones_user_admin_account
  5. 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.
  6. Now that you have control over the html for the user table, you can style through CSS as you see fit.
0

精彩评论

暂无评论...
验证码 换一张
取 消