-
Notifications
You must be signed in to change notification settings - Fork 0
Components
RapydFramework comes with some custom tags to allow a basic component system.
You can use the RapydFramework commponent tag to replicate a Python Markup Language file inside an existing one, avoiding to write the same thing over and over. You can use the tag accordingly:
rapydfw:component(src="path/to/component.pyml")
The nested component will nest your component inside a (without padding, margin and border). It allows to implement a simple island architecture inside RapydFramework. You can use the tag accordingly:
rapydfw:nested(src="path/to/component.pyml")
Some stuff to remember when using components:
You have to include the relative path to the component while using this tag. Example:
src="components/hello.pyml"
✅
src="C:/Users/lol/Code/myproject/src/components/hello.pyml"
❌
src="/components/hello.pyml"
❌
src="src/components/hello.pyml"
❌
To style global component propreties you will have to use a div, as style proprieties are going to be discarded during compile time. Example:
✅
div(style="border-style: solid;"):
rapydfw:component(src="path/to/component.pyml")
❌
rapydfw:component(style="border-style: solid;" src="path/to/component.pyml")