Problem/Motivation

Item list type is inherited from parent by all children. Lists of one type, i.e. ul cannot be a child of an ol list type.

Proposed resolution

Allow item_list children to define their own type attribute, in order to produce i.e. ol > li > ul.

Remaining tasks

- template_preprocess_item_list() from #1800726: Convert theme_item_list to item-list.twig applied to core 8.x.
- Documentation in template files.

User interface changes

- None.

API changes

- type attribute support in item_list children.

CommentFileSizeAuthor
item-list.patch2.29 KBdroplet

Comments

steveoliver’s picture

Status: Needs review » Needs work
steveoliver’s picture

Issue summary: View changes

Updated issue summary.

steveoliver’s picture

Status: Needs work » Reviewed & tested by the community

Looks good to me. Would like to see this in core.

catch’s picture

Title: Add 'type' support to theme_item_list nested child items » Change notice: Add 'type' support to theme_item_list nested child items
Category: feature » task
Priority: Normal » Critical
Status: Reviewed & tested by the community » Active

Looks reasonable to me, not really a feature either, test changes look fine too. Committed/pushed to 8.x. Needs a change notice for the API addition.

fabianx’s picture

Title: Change notice: Add 'type' support to theme_item_list nested child items » Add 'type' support to theme_item_list nested child items
Category: task » feature
Priority: Critical » Normal
Status: Active » Fixed

Change notice is here: http://drupal.org/node/1816204

So this is fixed.

steveoliver’s picture

Title: Add 'type' support to theme_item_list nested child items » Support custom child list types in theme_item_list()
Category: feature » task

Seems like a task to me. Change notice now includes an example.

tim.plunkett’s picture

Category: task » feature

It was originally a feature request, setting back. See #3

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.