{"id":248,"date":"2014-02-25T14:26:07","date_gmt":"2014-02-25T14:26:07","guid":{"rendered":"https:\/\/blogs.ncl.ac.uk\/t4\/?p=248"},"modified":"2016-11-14T09:35:34","modified_gmt":"2016-11-14T09:35:34","slug":"expandable-and-tabbed-content","status":"publish","type":"post","link":"https:\/\/blogs.ncl.ac.uk\/t4\/2014\/02\/25\/expandable-and-tabbed-content\/","title":{"rendered":"Expandable and Tabbed Content"},"content":{"rendered":"<p>There are two main ways of shortening a very long page:<\/p>\n<p><strong>Firstly<\/strong>, you can make the content <a href=\"http:\/\/dev-research.ncl.ac.uk\/yourproject\/contentsamples\/layoutexamples\/expandable\/\"><strong>Expandable<\/strong><\/a>, as seen on our <a href=\"http:\/\/www.ncl.ac.uk\/undergraduate\/degrees\/ng41\/entryrequirements\/\">Entrance Requirements<\/a> pages. This is useful when you have long lists of items on a page, but the page visitor is only likely to be interested in the one item that applies to their circumstances.<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Expandable-content.fw_.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-524\" src=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Expandable-content.fw_-300x192.png\" alt=\"expandable-content-fw\" width=\"300\" height=\"192\" srcset=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Expandable-content.fw_-300x192.png 300w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Expandable-content.fw_-768x493.png 768w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Expandable-content.fw_.png 1024w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Expandable-content.fw_-468x300.png 468w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>Secondly<\/strong>, you can make the content<a href=\"http:\/\/dev-research.ncl.ac.uk\/yourproject\/contentsamples\/layoutexamples\/tabs\/#firsttab\"><strong> Tabbed<\/strong><\/a>, which is also used in the course pages. Tabbed content is useful when you have lots of pages with similar categories (all courses have Modules, Careers, Finance information, for example).<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-content.fw_.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-525\" src=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-content.fw_-300x192.png\" alt=\"tabbed-content-fw\" width=\"300\" height=\"192\" srcset=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-content.fw_-300x192.png 300w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-content.fw_-768x493.png 768w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-content.fw_.png 1024w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-content.fw_-468x300.png 468w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Both methods are implemented in exactly the same way.<\/p>\n<p>Each Tab or Expandable needs to be its own piece of content within the same section. You&#8217;ll have to go to Add Content -&gt; All Purpose Content for each one. Here&#8217;s how the content looks for the Tabbed page in the Sample Content site:<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-Content-Multiple-Pieces-of-Content.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-253\" src=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-Content-Multiple-Pieces-of-Content-300x94.png\" alt=\"\" width=\"300\" height=\"94\" srcset=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-Content-Multiple-Pieces-of-Content-300x94.png 300w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-Content-Multiple-Pieces-of-Content-1024x323.png 1024w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-Content-Multiple-Pieces-of-Content-500x157.png 500w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/Tabbed-Content-Multiple-Pieces-of-Content.png 1043w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>In this example, the first piece of content has no special requirements, but the bottom three are tabbed. They become tabbed simply by giving them the class &#8216;<strong>tabbed<\/strong>&#8216; all in lower case &#8211; here&#8217;s a screenshot of the second tab from the Modify Content screen:<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentTabbed.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-254\" src=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentTabbed-300x261.png\" alt=\"\" width=\"300\" height=\"261\" srcset=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentTabbed-300x261.png 300w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentTabbed-1024x893.png 1024w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentTabbed-343x300.png 343w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentTabbed.png 1067w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The <strong>class field<\/strong> is at the bottom &#8211; remember to use only lower case. Also note that this piece of content has some embedded video from Vimeo &#8211; this is <a title=\"Embedding Video, Maps, Twitter and other media in your site\" href=\"https:\/\/blogs.ncl.ac.uk\/t4\/2014\/01\/23\/embedding-video-maps-twitter-and-other-media-in-your-site\/\">documented in another post<\/a>.<\/p>\n<p>The Content List for the expandable section looks more or less identical:<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentExpandable.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-255\" src=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentExpandable-300x94.png\" alt=\"\" width=\"300\" height=\"94\" srcset=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentExpandable-300x94.png 300w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentExpandable-1024x322.png 1024w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentExpandable-500x157.png 500w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyContentExpandable.png 1035w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The only significant difference is that the class field contains the word &#8216;expandable&#8217; in lowercase:<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyExpandableContent.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-256\" src=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyExpandableContent-300x268.png\" alt=\"\" width=\"300\" height=\"268\" srcset=\"https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyExpandableContent-300x268.png 300w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyExpandableContent-1024x916.png 1024w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyExpandableContent-335x300.png 335w, https:\/\/blogs.ncl.ac.uk\/t4\/files\/2014\/02\/ModifyExpandableContent.png 1035w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Remember to Save and Approve, and you&#8217;re done. The two types are fairly interchangeable. If you want to switch between one or the other, just change the class field, or to make it back into regular content, remove it entirely.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are two main ways of shortening a very long page: Firstly, you can make the content Expandable, as seen on our Entrance Requirements pages. This is useful when you have long lists of items on a page, but the &hellip; <a href=\"https:\/\/blogs.ncl.ac.uk\/t4\/2014\/02\/25\/expandable-and-tabbed-content\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":839,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,19],"tags":[],"class_list":["post-248","post","type-post","status-publish","format-standard","hentry","category-content-templates","category-the-class-field"],"_links":{"self":[{"href":"https:\/\/blogs.ncl.ac.uk\/t4\/wp-json\/wp\/v2\/posts\/248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ncl.ac.uk\/t4\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ncl.ac.uk\/t4\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/t4\/wp-json\/wp\/v2\/users\/839"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/t4\/wp-json\/wp\/v2\/comments?post=248"}],"version-history":[{"count":8,"href":"https:\/\/blogs.ncl.ac.uk\/t4\/wp-json\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":250,"href":"https:\/\/blogs.ncl.ac.uk\/t4\/wp-json\/wp\/v2\/posts\/248\/revisions\/250"}],"wp:attachment":[{"href":"https:\/\/blogs.ncl.ac.uk\/t4\/wp-json\/wp\/v2\/media?parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/t4\/wp-json\/wp\/v2\/categories?post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/t4\/wp-json\/wp\/v2\/tags?post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}