Skip to content

PageListIcons

Roland Toth edited this page Oct 28, 2017 · 1 revision

Add pagelist icons to the main pagelist.

This submodule allows setting icons for pagelist items. Can be used to replace a per-template icon setting (that is, control all in one place), or to set icons based on selectors (that couldn't be achieved using the built-in template icons).

Icons can be added in a "fontawesome icon name: selector" format in a textarea (each line being one rule). You can use a page ID, a page template name or selector to target pages in the page tree.

Examples:

cog: 2
file-o: basic-page
circle-thin: id=1025|1032
exclamation-circle: template=project, project_images.count<=2

Items lower in the list will overwrite previous items if there's a conflict. Note that the built-in template icon setting will overwrite icons you set here.

Additional class names

From v1.4.3 you can add additional class names to the icon to be able to format them with CSS. To do this, separate the font name with three underscores (iconname___classname1___classname2):

// add a "warning" class to page with id 1024
file-o___warning: 1024
// spinning cog icon for pages with "project" template
cog___fa-spin: template=project

Now in CSS you can set the icon color to red (see section "Add custom CSS or JavaScript to the admin" for more info):

i.warning::before {
    color: red;
}
Clone this wiki locally