{"id":530,"date":"2024-03-08T15:59:10","date_gmt":"2024-03-08T14:59:10","guid":{"rendered":"https:\/\/www.paalolav.no\/?p=530"},"modified":"2024-03-11T10:46:25","modified_gmt":"2024-03-11T09:46:25","slug":"pretty-little-faq","status":"publish","type":"post","link":"https:\/\/www.paalolav.no\/?p=530","title":{"rendered":"Pretty little FAQ"},"content":{"rendered":"\n<p>Many of my clients have the need for an FAQ on their intranet.<\/p>\n\n\n\n<p>The traditional way is still the way: using lists. But let&#8217;s make this more user friendly.<\/p>\n\n\n\n<p>As a sort of &#8220;UI for the back end&#8221; I always add the list as a tab in Microsoft Teams, using the Microsoft Lists app. This helps the customer to punch data in a much more user friendly way.<\/p>\n\n\n\n<p>Using PnP Modern Search for the front end, I wrote a handlebar template for the solution using &lt;PnP-Panel&gt;, which is one of the built in web components. You click (and search if you like) on the FAQ item and it pops up as a panel with the rich content. Anonymised screenshots below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/Closed-FAQ.png\"><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"810\" src=\"https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/Closed-FAQ.png\" alt=\"\" class=\"wp-image-532\" srcset=\"https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/Closed-FAQ.png 834w, https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/Closed-FAQ-300x291.png 300w, https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/Closed-FAQ-768x746.png 768w\" sizes=\"(max-width: 834px) 100vw, 834px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/OpenFAQ-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"842\" height=\"1024\" src=\"https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/OpenFAQ-1-842x1024.png\" alt=\"\" class=\"wp-image-533\" srcset=\"https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/OpenFAQ-1-842x1024.png 842w, https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/OpenFAQ-1-247x300.png 247w, https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/OpenFAQ-1-768x934.png 768w, https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/OpenFAQ-1-1263x1536.png 1263w, https:\/\/www.paalolav.no\/wp-content\/uploads\/2024\/03\/OpenFAQ-1.png 1398w\" sizes=\"(max-width: 842px) 100vw, 842px\" \/><\/a><\/figure>\n\n\n\n<p>Handlebar template:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"background-color: rgb(255, 255, 254); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 12px; text-wrap: nowrap; color: rgb(56, 56, 56);\">&lt;<\/span><span style=\"background-color: rgb(255, 255, 254); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 12px; text-wrap: nowrap; color: rgb(128, 0, 0);\">style<\/span><span style=\"background-color: rgb(255, 255, 254); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 12px; text-wrap: nowrap; color: rgb(56, 56, 56);\">><\/span><div style=\"background-color: rgb(255, 255, 254); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 12px; line-height: 18px; text-wrap: nowrap;\"><div>  <span style=\"color: #800000;\">.listevisning<\/span> {<\/div><div>    <span style=\"color: #ff0000;\">display:<\/span> <span style=\"color: #0451a5;\">block<\/span>;<\/div><div>    <span style=\"color: #ff0000;\">background-color:<\/span> <span style=\"color: #0451a5;\">#F0F9Fb<\/span>;<\/div><div>    <span style=\"color: #ff0000;\">position:<\/span> <span style=\"color: #0451a5;\">relative<\/span>;<\/div><div>    <span style=\"color: #ff0000;\">margin-bottom:<\/span> <span style=\"color: #09885a;\">10px<\/span>;<\/div><div>    <span style=\"color: #ff0000;\">padding-bottom:<\/span> <span style=\"color: #09885a;\">10px<\/span>;<\/div><div>    <span style=\"color: #ff0000;\">padding:<\/span> <span style=\"color: #09885a;\">10px<\/span>;<\/div><div>    <span style=\"color: #ff0000;\">border-radius:<\/span> <span style=\"color: #09885a;\">.375rem<\/span>;<\/div><div>    <span style=\"color: #ff0000;\">color:<\/span> <span style=\"color: #0451a5;\">#000000<\/span>;<\/div><div>  }<\/div><div>  <span style=\"color: #800000;\">.FAQ-visning<\/span> {<\/div><div>      <span style=\"color: #ff0000;\">padding-inline-start:<\/span> <span style=\"color: #09885a;\">0px<\/span>;<\/div><div>  }<\/div><div><span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">style<\/span><span style=\"color: #383838;\">><\/span>  <\/div><div>      <span style=\"color: #383838;\">&lt;<\/span><span style=\"color: #800000;\">ul<\/span> <span style=\"color: #ff0000;\">class<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"FAQ-visning\"<\/span><span style=\"color: #383838;\">><\/span><\/div><div>          {{#each data.items as |item|}}<\/div><div>              <span style=\"color: #383838;\">&lt;<\/span><span style=\"color: #800000;\">pnp-select<\/span><span style=\"color: #383838;\">><\/span><\/div><div>                      {{#> resultTypes item=item}}<\/div><div><span style=\"color: #383838;\">&lt;<\/span><span style=\"color: #800000;\">pnp-panel<\/span>   <\/div><div>    <span style=\"color: #ff0000;\">data-is-open<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"false\"<\/span> <\/div><div>    <span style=\"color: #ff0000;\">data-is-light-dismiss<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"true\"<\/span><\/div><div>    <span style=\"color: #ff0000;\">data-is-blocking<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"true\"<\/span><\/div><div>    <span style=\"color: #ff0000;\">data-size<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"3\"<\/span><\/div><div>    <span style=\"color: #ff0000;\">data-panel-header-text<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"{{Title}}\"<\/span><span style=\"color: #383838;\">><\/span><\/div><div>    <span style=\"color: #383838;\">&lt;<\/span><span style=\"color: #800000;\">template<\/span> <span style=\"color: #ff0000;\">id<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"panel-open\"<\/span><span style=\"color: #383838;\">><\/span><\/div><div>        <span style=\"color: #383838;\">&lt;<\/span><span style=\"color: #800000;\">div<\/span> <span style=\"color: #ff0000;\">class<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"listevisning\"<\/span><span style=\"color: #383838;\">><\/span>{{Title}}<span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">div<\/span><span style=\"color: #383838;\">><\/span><\/div><div>    <span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">template<\/span><span style=\"color: #383838;\">><\/span><\/div><div>    <span style=\"color: #383838;\">&lt;<\/span><span style=\"color: #800000;\">template<\/span> <span style=\"color: #ff0000;\">id<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"panel-content\"<\/span><span style=\"color: #383838;\">><\/span><\/div><div>        <span style=\"color: #383838;\">&lt;<\/span><span style=\"color: #800000;\">div<\/span> <span style=\"color: #ff0000;\">class<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"kategori\"<\/span> <span style=\"color: #ff0000;\">style<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"margin:10px;\"<\/span><span style=\"color: #383838;\">><\/span><\/div><div>          <span style=\"color: #383838;\">&lt;<\/span><span style=\"color: #800000;\">b<\/span><span style=\"color: #383838;\">><\/span>Kategori:<span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">b<\/span><span style=\"color: #383838;\">><\/span> {{FAQKategori}}<span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">div<\/span><span style=\"color: #383838;\">><\/span><\/div><div>        <span style=\"color: #383838;\">&lt;<\/span><span style=\"color: #800000;\">div<\/span> <span style=\"color: #ff0000;\">class<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"innhold\"<\/span> <span style=\"color: #ff0000;\">style<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"margin:10px;\"<\/span><span style=\"color: #383838;\">><\/span><\/div><div>          {{{FAQAnswer}}} <span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">div<\/span><span style=\"color: #383838;\">><\/span><\/div><div>    <span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">template<\/span><span style=\"color: #383838;\">><\/span><\/div><div><span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">pnp-panel<\/span><span style=\"color: #383838;\">><\/span><\/div><div>      {{\/resultTypes}}<\/div><div>              <span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">pnp-select<\/span><span style=\"color: #383838;\">><\/span><\/div><div>          {{\/each}}<\/div><div>        {{#if @root.properties.paging.showPaging}}<\/div><div>            {{#gt @root.data.totalItemsCount @root.properties.paging.itemsCountPerPage}}<\/div><div>            <\/div><div>                <span style=\"color: #383838;\">&lt;<\/span><span style=\"color: #800000;\">pnp-pagination<\/span> <\/div><div>                    <span style=\"color: #ff0000;\">data-total-items<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"{{@root.data.totalItemsCount}}\"<\/span> <\/div><div>                    <span style=\"color: #ff0000;\">data-hide-first-last-pages<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"{{@root.properties.paging.hideFirstLastPages}}\"<\/span><\/div><div>                    <span style=\"color: #ff0000;\">data-hide-disabled<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"{{@root.properties.paging.hideDisabled}}\"<\/span><\/div><div>                    <span style=\"color: #ff0000;\">data-hide-navigation<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"{{@root.properties.paging.hideNavigation}}\"<\/span><\/div><div>                    <span style=\"color: #ff0000;\">data-range<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"{{@root.properties.paging.pagingRange}}\"<\/span> <\/div><div>                    <span style=\"color: #ff0000;\">data-items-count-per-page<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"{{@root.properties.paging.itemsCountPerPage}}\"<\/span> <\/div><div>                    <span style=\"color: #ff0000;\">data-current-page-number<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"{{@root.paging.currentPageNumber}}\"<\/span><\/div><div>                    <span style=\"color: #ff0000;\">data-theme-variant<\/span><span style=\"color: #383838;\">=<\/span><span style=\"color: #0000ff;\">\"{{JSONstringify @root.theme}}\"<\/span><\/div><div>                <span style=\"color: #383838;\">><\/span><\/div><div>                <span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">pnp-pagination<\/span><span style=\"color: #383838;\">><\/span><\/div><div>            {{\/gt}}<\/div><div>            <\/div><div>        {{\/if}}<\/div><div><span style=\"color: #383838;\">&lt;\/<\/span><span style=\"color: #800000;\">content<\/span><span style=\"color: #383838;\">><\/span><\/div><\/div><\/code><\/pre>\n\n\n\n<p>Go ahead and take it for a spin. Make that FAQ pop for your clients!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many of my clients have the need for an FAQ on their intranet. The traditional way is still the way: using lists. But let&#8217;s make this more user friendly. As a sort of &#8220;UI for the back end&#8221; I always add the list as a tab in Microsoft Teams, using the Microsoft Lists app. This [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":535,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70,67,87],"tags":[97,99,98,100],"class_list":["post-530","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-intranet","category-sharepoint","category-pnp-modern-search","tag-faq","tag-handy","tag-intranet","tag-nice-to-have"],"_links":{"self":[{"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/posts\/530"}],"collection":[{"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=530"}],"version-history":[{"count":2,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/posts\/530\/revisions"}],"predecessor-version":[{"id":537,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/posts\/530\/revisions\/537"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/media\/535"}],"wp:attachment":[{"href":"https:\/\/www.paalolav.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}