{"id":2619,"date":"2021-10-05T06:06:15","date_gmt":"2021-10-05T06:06:15","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=2619"},"modified":"2021-10-05T06:06:15","modified_gmt":"2021-10-05T06:06:15","slug":"customizing-the-user-list-layout-in-drupal","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/customizing-the-user-list-layout-in-drupal\/","title":{"rendered":"Customizing The User List Layout In Drupal"},"content":{"rendered":"<p>In this article we are going to understand how to override the default user list page layout while using phptemplate primarily based themes and also the profile.module. you&#8217;ll see the user list page after you go to any web address followed by \u2018profile\u2019 for example\u2013<\/p>\n<p><code>www.example.com\/profile<\/code><\/p>\n<p>With the utilization of this override it&#8217;s possible for you to manage the profile fields that are displayed and you&#8217;ll additionally control their positioning\/layout.<\/p>\n<p>Step 1<\/p>\n<p>Open a text editor like notepad.exe, create a file named template.php with the utilization of the subsequent snippet. If you have already have a template.php file, simply add it to your existing one.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2621 aligncenter\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/drupal-1-300x167.jpg\" alt=\"drupal-1\" width=\"621\" height=\"346\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/drupal-1-300x167.jpg 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/drupal-1.jpg 621w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/p>\n<p>You must be sure to upload the template.php file to your active theme folder.<\/p>\n<p>Step 2<\/p>\n<p>The template.php snippet catches the default user list page layout before it&#8217;s displayed and it additionally appearance within the same folder for profile_profile.tpl.php file that determines the new layout.<\/p>\n<p>A very simple example of a<\/p>\n<p><code>profile_profile.tpl.php<\/code><\/p>\n<p>file maybe illustrated as follows<\/p>\n<p>Here the custom extended fields that are setup are called profile_city, profile_country, profile_postcode<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2622 aligncenter\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/drupal-2-300x110.jpg\" alt=\"drupal-2\" width=\"623\" height=\"229\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/drupal-2-300x110.jpg 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/10\/drupal-2.jpg 623w\" sizes=\"auto, (max-width: 623px) 100vw, 623px\" \/><\/p>\n<p>Upload your profile_profile.tpl.php file to your active theme folder and go to your user list page at<\/p>\n<p><code>www.example.com\/profile<\/code><\/p>\n<p>to view the new layout.<\/p>\n<p>You can perform the following functions Once the process is complete:<\/p>\n<p>According to your preference Name the classes or change the layout.<br \/>\nEdit your style.css file or whatever your main style sheet is termed so as to regulate the category designs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article we are going to understand how to override the default user list page layout while using phptemplate primarily based themes and also the profile.module. you&#8217;ll see the user list page after you go to any web address followed by \u2018profile\u2019 for example\u2013 www.example.com\/profile With the utilization of this override it&#8217;s possible for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-2619","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=2619"}],"version-history":[{"count":1,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2619\/revisions"}],"predecessor-version":[{"id":2623,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2619\/revisions\/2623"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=2619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=2619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=2619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}