Hoppa till huvudinnehåll

Header Template

The header is a customizable component within Snowfire's default template. Users can select from built-in options or create custom headers through Firecode, with configuration managed via settings.jso

Uppdaterad för mer än en vecka sedan

The header is a customizable component within Snowfire's default template. Users can select from built-in options or create custom headers through Firecode, with configuration managed via settings.json.

Default Header Options

Two pre-built headers are available:

  • echo-header-1

  • echo-header-2

All default styling uses the .echo-header-X namespace.

Styling Guidelines

When adding custom header styles to style.scss, avoid using class names prefixed with "echo" or "sf" to prevent conflicts with official styles.

Logo Implementation

The logo function in header.tpl displays user-uploaded logos with retina optimization.

Built-in Size Options

Size

Dimensions

Small

140x60

Medium

210x70

Large

340x90

Custom dimensions can be specified via height/width parameters.

Navigation Structure

Navigation uses the com_menu component with configurable parameters.

Key Parameters

Parameter

Description

id

Integer 100-199 (prevents ID collisions)

syncId

Maintains menu consistency across subpages

childrenLevels

Supports 0 or 1 sublevel

activeClass

Applied to current page links

hasChildrenClass

Applied to items with sublevels

itemHtml

Customizable HTML template for items

childItemHtml

Customizable HTML template for child items

htmlElement

Wrapper element (defaults to <ul>)

Menu Behavior

Active menu items receive the specified active class, with root-level items also receiving an -root suffix variant.

Default Header Architecture

The standard header employs two separate menu instances (id="100" and id="101") rendered in different DOM areas - one for desktop, one for mobile - sharing the same syncId for synchronization.

Fick du svar på din fråga?