Rare
  • Introduction
  • HTML
    • Introduction
    • Html Structure
      • Header
      • Left Side Menu
      • Main Content
    • Main Content
      • Buttons
      • Fonts
      • Lock Screens
      • Maps
      • Modals
      • Plugins Used
      • Progress Bars
    • Css Files
    • Java Script Used
    • Scss
    • Fonts Used
    • Images used
    • Starts New page
      • Centered Logo
      • Compact Menu
      • Default
      • Horizontal
      • Light Side Bar
      • Mmenu
  • Rare Builder
    • Layouts
      • Default
      • Centered Logo
      • Compact Menu
      • Fixed Menu
      • Fixed Header
      • Horizontal
      • Icon Horizontal
      • Dark
      • Full Width
      • Header Style
      • Fixed Footer
      • Mmenu
      • Light Sidebar
    • Macros
      • Layouts
      • Breadcrumb
    • Partials
      • Headers
        • Header
        • Centered Logo Header
      • Heads
        • Head
      • Breadcrumbs
        • Breadcrumb 1
        • Breadcrumb 2
        • Breadcrumb 3
        • Breadcrumb 4
        • Breadcrumb 5
        • Breadcrumb Default
      • Ends
        • End
      • Menus
        • Default
        • Horizontal
        • Icon Horizontal
        • Compact
        • Mmenu
      • Footer
        • Footer
        • Fixed Footer
      • Messages
      • Notifications
      • User Profile
    • Add Builder
    • Commands
    • New Page
  • FAQ
    • Change Left Menu Content
    • Setting Layout As Default
    • Change Breadcrumb
    • Change Colors In scss
Powered by GitBook
On this page

Was this helpful?

  1. Rare Builder
  2. Macros

Layouts

Using this macro file we can call particular layout from all the layouts by using command gulp nunjucks --layout layoutname.

{% macro layout_type(layout) %}

{% if layout=="default" %}
    {% extends "default.html" %}

{% elif layout=="fixed-menu" %}
    {% extends "fixed-menu.html" %}

{% elif layout=="fixed-header" %}
    {% extends "fixed-header.html" %}

{% elif layout=="compact-menu" %}
    {% extends "compact-menu.html" %}

{% elif layout=="centered-logo" %}
    {% extends "centered-logo.html" %}

{% elif layout=="horizontal-layout" %}
    {% extends "horizontal-layout.html" %}

{% elif layout=="dark-layout" %}
    {% extends "dark-layout.html" %}

{% elif layout=="icon-horizontal" %}
    {% extends "icon-horizontal.html" %}

{% elif layout=="fullwidth-layout" %}
    {% extends "fullwidth-layout.html" %}

{% elif layout=="fixed-footer" %}
    {% extends "fixed-footer.html" %}

{% elif layout=="header-style1" %}
    {% extends "header-style1.html" %}

{% elif layout=="light-sidebar" %}
{% extends "light-sidebar.html" %}

{% elif layout=="mmenu" %}
{% extends "mmenu.html" %}

{% else %}

    {% extends "default.html" %}


{% endif %}
{% endmacro %}

{{ layout_type(layout) }}
PreviousMacrosNextBreadcrumb

Last updated 5 years ago

Was this helpful?