All Projects → elfacht → craft-helper

elfacht / craft-helper

Licence: MIT license
A collection of useful Craft CMS macros and components.

Programming Languages

HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to craft-helper

PhpStorm-Live-Templates-Craft-CMS
PhpStorm Live Templates for Craft CMS
Stars: ✭ 34 (+47.83%)
Mutual labels:  twig, craftcms
Craft
Composer starter project for Craft CMS
Stars: ✭ 122 (+430.43%)
Mutual labels:  twig, craftcms
Craft Emptycoalesce
Empty Coalesce adds the ??? operator to Twig that will return the first thing that is defined, not null, and not empty
Stars: ✭ 24 (+4.35%)
Mutual labels:  twig, craftcms
Cms
Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond.
Stars: ✭ 2,713 (+11695.65%)
Mutual labels:  twig, craftcms
Generator Baukasten
Awesome!
Stars: ✭ 50 (+117.39%)
Mutual labels:  twig, craftcms
craft-twig
Craft CMS Package for Atom
Stars: ✭ 17 (-26.09%)
Mutual labels:  twig, craftcms
spectre-canjs
A data administration component library built on the Spectre.css framework enabled with CanJS
Stars: ✭ 25 (+8.7%)
Mutual labels:  components
gumdrops
GumGum's React Reusable Component Library
Stars: ✭ 56 (+143.48%)
Mutual labels:  components
webmention
Webmention Plugin for Craft CMS
Stars: ✭ 38 (+65.22%)
Mutual labels:  craftcms
twig-bulma-form-theme-bundle
A Twig Form Theme for Bulma 0.3.x for use with the Symfony 2.8 / 3.x framework
Stars: ✭ 24 (+4.35%)
Mutual labels:  twig
phpstorm-settings
PhpStorm settings used for Craft CMS development.
Stars: ✭ 46 (+100%)
Mutual labels:  craftcms
storybook-talk
Storybook, the playground you need for your UI components! 🎨
Stars: ✭ 11 (-52.17%)
Mutual labels:  components
ng-vcl
Angular VCL ‒ an Angular component library based on the VCL CSS eco system
Stars: ✭ 17 (-26.09%)
Mutual labels:  components
SettingsUI
Windows 11 settings page in WinUI 3 applications ported from Powertoys
Stars: ✭ 95 (+313.04%)
Mutual labels:  helper
react-parallax-card
[wip] React component for a 3D card with parallax effects similar to Apple TV app icons.
Stars: ✭ 21 (-8.7%)
Mutual labels:  components
store-hours
Manage business hours with Craft CMS.
Stars: ✭ 60 (+160.87%)
Mutual labels:  craftcms
craft3-fallback-site
Failing requests in a multi-site install can fall back to other sites, to prevent 404 errors from missing or disabled entries.
Stars: ✭ 14 (-39.13%)
Mutual labels:  craftcms
components
Components library for the Blockchain.com ecosystem 💍 🔥
Stars: ✭ 20 (-13.04%)
Mutual labels:  components
blockml-component
A component-based virtual DOM system (similar to React) for blockml.
Stars: ✭ 23 (+0%)
Mutual labels:  components
craft-plugin-doxter
Markdown Editor and Advanced Parser for Craft CMS
Stars: ✭ 23 (+0%)
Mutual labels:  craftcms

Craft CMS Macros and Components

A collection of Craft CMS macros and components I frequently use on projects. Feel free to use, alter and extend. Suggestions are welcome.

How to use macros

I usually set the macro include in a first level template like _router.html from where I delegated all my pages and set macrosas a parameter on includes:

{# _router.html or another first level template #}
{% set macros = 'partials/_/_macros.html' %}
{% set notfound = '404' %}

{% include ['pages/' ~ entry.type.handle, notfound] with { macros: macros } %}

In the page template I just import the macros and inherit it to the components:

{# page.html #}
{% import macros as helper %}

{# Macro: macros/include.twig #}
{{helper.include('modules', 'hero', {
	image: entry.image.one() ?? null,
	macros: macros
})}}

The _macros.html or .twig:

{% macro myMacro(param) %}
{# Do something here #}
{% endmacro %}

License

Itsa MIT!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].