-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blueprints - import@ always on top #1844
Comments
This is currently a limitation of the import@ feature. I've run into this myself, and currently, there is not work around to fix it. |
@mahagr do you have any thoughts on how to address this? |
Custom ordering should work if the blueprint is properly initialized. Will need to investigate this. |
You're right, the current logic doesn't allow you to append the blueprints where you want them to be. I've been working on adding support for multiple imports in the same level: import@1: fields/hero
import@2: fields/footer I've also added support for partial imports: # Same as without specifying partial import:
import@: fields/hero:form
# Imports hero section separator:
import@: fields/hero:form/fields/hero
# Imports fields outside of the main form:
import@: fields/footer:test/fields
# Imports also work from the current file:
import@: :include/fields I'm still trying to figure out how to fix the ordering, so nothing is committed yet... |
Your issue is in rockettheme/toolbox#18 |
Any news on the multiple import feature? I've just stumbled accross this, when I tried to import multiple partials into one blueprint file.
|
fields:
import@1: partials/cta
import@2: partials/fileupload |
@mahagr can you confirm using import@1 ... import@2 is a very recent addition as I tried that a few weeks ago and it was not working. |
Looks like this feature isn't yet in the released
Find the line and replace the value before running the command. |
Thank you, I can work with composer but may wait until it's in grav core. |
Edit: It seems to ignore the number. I dont know why I thought it worked before, maybe I did not check carefully enough? At least this feature would be very helpful! So what happens is that both templates get included, but not ordered properly. |
Number is there just do make the key to differ, allowing multiple instances of the same command. |
So sorting is not possible at all? :-( I think the issue can be closed then, as it works as expected. Is implementing a sorting function an option to you? We could track it in another issue. |
Yeah... Unfortunately the blueprints do not handle importing other documents too well. However, if you define the structure in the main template, you will be able to dictate the ordering of the main elements. |
When Embedding Form (@import), the imported fields always go on top, above the default fields. Using ordering@ has no effect.
(SEE SCREENSHOT - i'm using the tinyMCE editor plugin)
![schermafbeelding 2018-01-28 om 22 06 05](https://user-images.githubusercontent.com/20650976/35487049-8db909e0-0477-11e8-9b42-842dfd3f45a5.png)
The parent file:
![schermafbeelding 2018-01-28 om 22 17 52](https://user-images.githubusercontent.com/20650976/35487194-2d0e67e6-0479-11e8-9d19-101d19d6bd2f.png)
the fields to import:
![schermafbeelding 2018-01-28 om 22 16 43](https://user-images.githubusercontent.com/20650976/35487185-0b60be5a-0479-11e8-951c-b614fce473f1.png)
How do you keep the default fields on top?
The documentation states:
But this seems not to be the case?
What am i doing wrong here?
The text was updated successfully, but these errors were encountered: