marko
marko copied to clipboard
Have a tag with subfolder reference in the tagname
Description
With auto tag discovery, it takes the foldername as the tag lib, assuming index.marko exists, however, if you want to make a subfolder within that and the index.marko does not exist in root, it should use the subfolder as the component in concatenation with the rootfolder name ex: <rootFolder\subFolder
Why
Organization and Sanity
Use Cases
For organization of common components, would like to group all buttons together in Components/, have a folder called buttons, with no marko file and within that have multiple folders \ components
- save\index.marko
- new\index.marko
- edit\index.marko
- cancel\index.marko That way, we can reference the tag <buttons\save <buttons\new <buttons\cancel etc
Another ucase case is to make the subfolders non-global components, so the name can be reused, crud views
- In components\products
-- create -- read -- update -- delete - In components\customers
-- create -- read -- update -- delete
That way you can have
<products\create <products\read <products\update <products\delete
<customers\create <customers\read <customers\update <customers\delete