{"id":1382,"date":"2018-02-06T21:30:20","date_gmt":"2018-02-06T21:30:20","guid":{"rendered":"http:\/\/wordpress.library.illinois.edu\/wp-training\/?page_id=1382"},"modified":"2018-03-07T22:16:06","modified_gmt":"2018-03-07T22:16:06","slug":"library-directory-shortcode","status":"publish","type":"page","link":"https:\/\/wordpress.library.illinois.edu\/wp-training\/shortcodes\/library-directory-shortcode\/","title":{"rendered":"Library Directory Shortcode"},"content":{"rendered":"<h2>Use Case<\/h2>\n<p>The library directory shortcode displays information about library employees using their netid. This is the same data used in the biography pages. The default behavior &#8212; see below &#8212; is to display basic contact information about the individual. However, all attributes can be omitted, and additional attributes are available.<a href=\"#attributes\"> See a list of all attributes<\/a> and their default value.<\/p>\n<h2>How to Use<\/h2>\n<h3>Example 1: Default behavior<\/h3>\n<div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-neutral-200 !sh-text-black \"><div><div class=\"\">\n<h4>Code<\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n[libdirectory netid=\"w-mischo\"]<br \/>\n<\/div><\/div><\/div><\/p>\n<h4>Result<\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n<div><p style=\"margin: 0 !important;\"><strong>Name: <\/strong><\/p><p style=\"margin: 0 !important;\"><strong>Office Address: <\/strong><\/p><p style=\"margin: 0 !important;\"><strong>Phone Number: <\/strong><\/p><p style=\"margin: 0 !important;\"><strong>Email: <\/strong><\/p><p style=\"margin: 0 !important;\"><strong>Title: <\/strong><\/p><\/div><br \/>\n<\/div><\/div><\/div><br \/>\n<\/div><\/div><\/div><\/p>\n<div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-neutral-200 !sh-text-black \"><div><div class=\"\">\n<h3>Example 2: Adding attributes<\/h3>\n<h4>Code<\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n[libdirectory netid=\"w-mischo\"\u00a0label=\"false\" picture=\"true\" office_address=\"false\" phone_number=\"false\" email=\"false\" banner_title=\"false\"]<br \/>\n<\/div><\/div><\/div><\/p>\n<h4>Result<\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n<div><img decoding=\"async\" width=\"112.5px;\" src=\"\" alt=\"\"><p style=\"margin: 0 !important;\"><\/p><\/div><br \/>\n<\/div><\/div><\/div><br \/>\n<\/div><\/div><\/div><\/p>\n<h3 id=\"attributes\">Required Attribute<\/h3>\n<ul>\n<li>netid: empty<\/li>\n<\/ul>\n<h3>Default Attributes<\/h3>\n<ul>\n<li>name: true<\/li>\n<li>office_address: true<\/li>\n<li>phone_number: true<\/li>\n<li>email: true<\/li>\n<li>banner_title: true<\/li>\n<li>label: true<\/li>\n<\/ul>\n<h3>Additional Attributes<\/h3>\n<ul>\n<li>picture: false<\/li>\n<li>first: false<\/li>\n<li>last: false<\/li>\n<li>employee_type: false<\/li>\n<li>research_interests: false<\/li>\n<li>education: false<\/li>\n<li>appointment_url: false<\/li>\n<li>experts_url: false<\/li>\n<li>notes: empty<\/li>\n<li>table: false<\/li>\n<li>only-picture: false<\/li>\n<li>include_bio: false<\/li>\n<\/ul>\n<h3>About Attributes<\/h3>\n<ul>\n<li>\u00a0&#8220;First&#8221; and &#8220;last&#8221; refer to the first and last name. You may set the attribute &#8220;name&#8221; to false and choose to display either first or last on their own.<\/li>\n<li>Some attributes may not show when set to true. This is typically the case if the data is missing from the database or set to be omitted if it is a biography page metadata.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Use Case The library directory shortcode displays information about library employees using their netid. This is the same data used in the biography pages. The default behavior &#8212; see below &#8212; is to display basic contact information about the individual. However, all attributes can be omitted, and additional attributes are available. See a list of [&hellip;]<\/p>\n","protected":false},"author":71,"featured_media":0,"parent":24,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-1382","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/pages\/1382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/users\/71"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/comments?post=1382"}],"version-history":[{"count":10,"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/pages\/1382\/revisions"}],"predecessor-version":[{"id":1548,"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/pages\/1382\/revisions\/1548"}],"up":[{"embeddable":true,"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/pages\/24"}],"wp:attachment":[{"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/media?parent=1382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}