Skip to content
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

Modular Blueprints not appearing in Admin #140

Closed
sparrow925 opened this issue Feb 3, 2020 · 7 comments
Closed

Modular Blueprints not appearing in Admin #140

sparrow925 opened this issue Feb 3, 2020 · 7 comments

Comments

@sparrow925
Copy link

@sparrow925 sparrow925 commented Feb 3, 2020

Apologies if I'm missing something basic, but this used to work and it no longer does for me. After a few days of tinkering and reading through the docs, I'm stumped.

This is an example I tried using a fresh Quark download today, and I do not see the Admin tabs that the modular blueprint file should be adding.

File structure

user
|   
+---pages
|   \---01.home
|       |   modular.md
|       |   
|       \---01._hero
|               header.jpg
|               hero.md
|               
\---themes
    \---quark
        \---blueprints
            \---modular
                    hero.yaml

Content of the .md files:
modular.md

---
title: Home
content:
    items: '@self.modular'
body_classes: 'title-h1h2 header-transparent'
menu: Home
onpage_menu: false
---

hero.md

---
title: 'Homepage Top Image'
menu: Top
hero_classes: 'text-light title-h1h2 parallax overlay-dark-gradient hero-fullscreen'
hero_image: header.jpg
---

Edited for filetree formatting...

@mahagr

This comment has been minimized.

Copy link
Member

@mahagr mahagr commented Feb 4, 2020

Try blueprints/pages/modular/hero.yaml

@sparrow925

This comment has been minimized.

Copy link
Author

@sparrow925 sparrow925 commented Feb 4, 2020

No change, shoot.

I noticed that user/theme/blueprints/default.yaml is having the intended effect on the admin page. When moved to user/blueprints/pages/default.yaml it does not. This is consistent with some other troubleshooting threads I found. The page folder is discussed as necessary for adding blueprints in user/blueprints but not in user/theme/blueprints.

I also tried to move the modular files to user/blueprints/pages/modular and that doesn't work either. Note that user/blueprints/pages/default.yaml does work.

@paulhibbitts

This comment has been minimized.

Copy link
Contributor

@paulhibbitts paulhibbitts commented Feb 4, 2020

Hi @sparrow925 , I use a few modular blueprints for my Quark Open Publishing theme in blueprints/modular:
https://github.com/hibbitts-design/grav-theme-quark-open-publishing/tree/master/blueprints/modular

You could explore a live version of this in my Open Publishing Space skeleton:
https://github.com/hibbitts-design/grav-skeleton-open-publishing-space/releases/tag/v1.6.1

Perhaps the issue is with your blueprint? You could post it here just in case.

@sparrow925

This comment has been minimized.

Copy link
Author

@sparrow925 sparrow925 commented Feb 4, 2020

Thanks for the examples @paulhibbitts! I'll dive in and try to find differences. For giggles, I changed the @extends to match your blueprints exactly (with the type and context breakouts) but saw no change.

In the meantime, here is the blueprint file I'm using as my test subject... it's one of the default Quark modular blueprints. I've tried to strip this issue down to the bare bones and am using a fresh copy of Grav and Quark to figure out what the heck is happening. The issue is happening on both my Mac (blank slate) and PC (fresh-ish WSL Ubuntu 18.04 installation) development environments which aren't loaded down with much of anything, so I'm tempted to rule out an external issue. But... Is anyone else having issues with this in a fresh Grav/Quark instance?

title: Hero
'@extends': default

form:
  fields:
    tabs:
      fields:
        buttons:
          type: tab
          title: Hero
          fields:
            header.hero_classes:
              type: text
              label: Hero Classes
              markdown: true
              description: 'There are several Hero class options that can be listed here (space separated):<br />`text-light`, `text-dark`, `title-h1h2`, `parallax`, `overlay-dark-gradient`, `overlay-light-gradient`, `overlay-dark`, `overlay-light`, `hero-fullscreen`, `hero-large`, `hero-medium`, `hero-small`, `hero-tiny`<br />Please consult the [Quark documentation](https://github.com/getgrav/grav-theme-quark#hero-options) for more details.'
            header.hero_image:
              type: filepicker
              label: Hero Image
              preview_images: true
              description: 'If not specified, this defaults to the first image found in the page''s folder'
@paulhibbitts

This comment has been minimized.

Copy link
Contributor

@paulhibbitts paulhibbitts commented Feb 4, 2020

Thanks @sparrow925 , I just noticed this... change 01._hero folder name to _hero and see if that works. That should then define it as a proper modular page (vs a child page as the numeric prefix sets it as).

BTW, for issues like this, the Discord chat or getgrav.org Forum is a better place - happy to try to help you in either of those places if the above does not address your issue.

Cheers,
Paul

@sparrow925

This comment has been minimized.

Copy link
Author

@sparrow925 sparrow925 commented Feb 4, 2020

I've tried that as well, no dice. I made a post in the Grav forum as well, here. Happy to continue there.

@paulhibbitts

This comment has been minimized.

Copy link
Contributor

@paulhibbitts paulhibbitts commented Feb 4, 2020

Great, could you please close the issue and we will continue there🙂

@sparrow925 sparrow925 closed this Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.