-
Notifications
You must be signed in to change notification settings - Fork 206
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
Custom Outline for Blog Media image display #2006
Comments
Hi @blackyzero, not sure about #2, but for #1 are you trying to do something like this? http://demo.hibbittsdesign.org/grav-eportfolio-blog/ |
Yeah, that's exactly what i want for 2) For 1) i need to align the image and the side bar following the top of right sidebar Thank you. |
i could answer 2), this is feature in Page "Blog Item" section and Header image. Regard to 1), i look into your site, and it's exactly the one i need to customize as below, align header blog image and the search box in right sidebar, as below: |
So for that skeleton (which you can download and access the repo at https://github.com/hibbitts-design/grav-skeleton-eportfolio-blog) I've added some custom Twig and a page folder to hold the header image. Please note that the header image is site wide though - will that work for you? I am hoping to get this eventually done as a Particle, but in the meantime I've used a customized Engine Twig file (which is not recommended, but it works):
Please let me know if the above works for you, but remember it does use a non-recommended method (http://docs.gantry.org/gantry5/theme-development/theme-customization#override-pagehtmltwig-not-recommended). |
An update: based on this discussion I've added initial support for page-level site header images - you can now simply include the You can grab the updated twig at https://github.com/hibbitts-design/grav-skeleton-eportfolio-blog/blob/master/themes/g5_hydrogen/custom/engine/templates/page.html.twig |
@paulhibbitts There's 4 positions in the document that you can be used to add html from atom or particle.
Options to play with are: So it would be easier to just make an atom for this. :) |
@mahagr That would be definitely preferable 🙂 So far I was unable to find a way to do that and insert the image before the menubar... I will try your suggestion and see what I get, thanks very much! |
Amazing, thanks again @mahagr for pointing me to using pageblock👍 @blackyzero , site and page-level header images are now available as a Atom at https://github.com/hibbitts-design/grav-gantry-atom-header-image Please let me know if this works for you. |
It's really atom, not particle, lol. :) But yeah, makes it really easy to do almost whatever you want, doesn't it? |
LOL, yes I should call Atoms... 'Atoms' Thanks again, I am finding Gantry more and more amazing as I get into a bit more. |
thanks a lot @paulhibbitts and @mahagr I tried to do as your instruction, but still couldn't get it works. Under user/themes/g5_helium/custom/particles/ folder,
Under root level, create folder headerimage/, same level as user/ and index.php file
Still couldn't see that image. Still not work too. Thanks so much! |
After giving some tries, the header image still doesn't show, from inspect window i can see the related code for header image, and the image is also visible if browsing to image URL |
finally, i got it works, after making CSS change from Base Outline. I think this triggered to recompile the custom.scss file. i have another question, how could i turn off the header image on specific pages like a filter display for header image? |
Glad you got it going @blackyzero . I will add a note on the Atom re: Gantry cache/CSS recompile. BTW, are you working in Gantry 'Development' mode? Re: Turn off image header... hmmm... the only way to do that is to remove the "headerimage" folder from the root of the site and then only within the pages you want a header to be displayed place the folder (or symlink I guess?). Right now there is no way to set a page to not display the image if there is a top-level (i.e. root) image available. Will that work-around do for now? |
No, i am using Production mode. Thanks again @paulhibbitts |
Production mode saves some CPU time by not looking at changes in the filesystem. This is why your changes didn't show up (without clearing cache or manual recompile). |
thank you for that info. |
Hi everyone,
I am using Grav and Gantry, i created a Outline with Right sidebar, then assign it for blog page.
The point is, i want Page Media (image or video) can show as header image instead of showing in blog header content as below.
How could i show blog Page Media as in Header particle? applied for all blog pages.
In case, i still want to keep the blog Page Media as part of blog content, How could i align the image and the sidebar to make both of them on same line.
Thank you.
The text was updated successfully, but these errors were encountered: