SOLVED I can I have multiple Page Content particles on the same page?
Posted 5 years 1 month ago
In Grav and Gantry 5, I am creating a custom version of the
contact page in the Epsilon theme
. On that page, there is a Page Content particle that displays the content from the /form page.
I would like the Sidebar particle to also display content from a Page, so that users who don't have access to the Gantry section of the Admin area can update a page's content using the Page editor, to update the information in the Sidebar. How can I do that?
I would also like the contents of another page to display at the bottom, under "More Details".
You can use the "grav content" particle on the layout of your outline to render other GRAV content in addition to that specified by ytour menu item.
Regards, Mark.
Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
Re: SOLVED I can I have multiple Page Content particles on the same page?
Posted 5 years 1 month ago
I was thinking I could configure Page Content to change the page it got its content from, but that's not how it works. I started
creating a new particle
, which includes a "Page" field where the user can enter the page whose content will be shown. I haven't dug into the Twig docs yet, to figure out how to do that.
That's great if the Grav Content particle can already do what I have in mind. However, in it's settings, instead of a Page field, it has a Categories field. I assume that it pulls a series of pages in a specified category, i.e. "blog". So to use this, I'd create a unique category for the page I want displayed? I'll try that.
Or perhaps I'll copy the twig code from the Grav Content particle, to add to my new particle that pulls the content from a single, specified page. Thanks!
Re: SOLVED I can I have multiple Page Content particles on the same page?
Posted 5 years 1 month ago
The Grav Content particle, with unique categories, will work for my needs. Although I have to include the title markup within the content itself, along with some custom CSS to position it correctly. Otherwise, the particle surrounds the title with a hyperlink to the page itself, which I don't want visible. It would be nice to have another option in the particle, right under the Title: Show/Hide: Link to Page: yes/no.
Re: SOLVED I can I have multiple Page Content particles on the same page?
Posted 5 years 1 month ago
The contentarray particle (aka grav content) is a core Gantry 5 particle - if you want changes to that then raise an issue on the Gantry 5 project and one of the project contributors may feel inclined to assist you.
Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.