7

The Craft documentation on Section Types state that they themselves are created using a Structure. Can someone explain the method they used here?

What I'd really like to see is the Twig code for the left hand navigation. Are there multiple Structures here (to account for the headings) and if not, how are the headings set?

Thanks!

6

There is a Documentation structured section with three entry types.

  1. Heading Only
  2. Page
  3. Link

The Getting Started, Core Concepts, etc. headers are the Heading Only entry type. The only field is has is a title.

The majority of the docs are using the Page entry type.

The Link entry type is used for the entries like Full Templating Reference and Plugin Development that open into a new window, and those are their own separate structured sections.

| improve this answer | |
  • I'm guessing that Link entry type has a checkbox to select whether or not you're linking to an external page. Is this how links such as "Installing and Updating", which links within the same structure, look different than external links like "Full Templating Reference"? – carlcs Mar 20 '15 at 8:10
  • Or are you doing something more fancy to do those "sub-headings"? getDescendants(1).first().url? – carlcs Mar 20 '15 at 8:16
  • @RobHodges I think this might be the twig code for that side nav too gist.github.com/brandonkelly/9362241 – Mike Pepper Mar 20 '15 at 13:21
  • @carlcs The Link entry type has a Title and a Link Url (i.e. 'docs/templating'). See the gist that @MikePepper linked to for the template code to pull it out. – Brad Bell Mar 20 '15 at 15:22
  • Hmm, can I just ask, in the snippet @MikePepper sent, does anyone know what selEntry is? – Rob Hodges Mar 26 '15 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.