Wowchemy-hugo-modules: Creating a new widget page (in addition to home page)

Created on 28 Dec 2017  路  2Comments  路  Source: wowchemy/wowchemy-hugo-modules

I would like to add a new widget page to my Academic themed site.

For example: I'd like to keep the default home page, but have a separate CV page where each widget is a part of a CV (education, past institutions, publications, etc.).

My attempt:

I have created a content\CV\_index.md file and a corresponding layouts\CV\list.html file with the following content:

{{ partial "new_widget_page.html" . }}

The corresponding layouts\partials\new_widget_page.html is a copy of \themes\academic\layouts\partials\widget_page.html, but now I'd like to modify it so that it runs over a separate set of widgets that should not appear on the homepage.

I know that most of the work is in this block of code:

{{ range $index, $page := where (where .Data.Pages "Section" $section) ".Params.active" "!=" false }}
  {{ $params := dict "root" $ "page" $page }}
  {{ $widget := printf "widgets/%s.html" ( or $page.Params.widget "custom" ) }}
  <section id="{{ $page.File.TranslationBaseName }}" class="home-section">
    <div class="container">
      {{ partial $widget $params }}
    </div>
  </section>
{{ end }}

Unfortunately I'm trying to figure out how to modify this so that this runs over a "CV only" set of widgets. For now each of these widgets can be generic custom widgets, but eventually I'd like to be able to make new widget layouts for this CV page.

Apologies for the newbie question---thank you very much for this theme and for the discussions, I have been learning a lot by playing with it.

Most helpful comment

There is no need to code your own widget page, the feature already exists and is documented here: https://sourcethemes.com/academic/docs/managing-content/#create-a-widget-page

All 2 comments

There is no need to code your own widget page, the feature already exists and is documented here: https://sourcethemes.com/academic/docs/managing-content/#create-a-widget-page

Thank you---I'd completely missed that part of the documentation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pjox picture pjox  路  4Comments

ivlis picture ivlis  路  4Comments

brianguay picture brianguay  路  4Comments

henningninneh picture henningninneh  路  3Comments

somnathrakshit picture somnathrakshit  路  3Comments