পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Monday, February 20, 2017

Grav - Modular Pages

Modular pages are difficult to understand at first but once you get to know about it, it would be very easy to work with. It enables to create a single page from its child pages. It has the ability to build complex one page layouts from modular content pages.

Modular pages are set as non-routable because they cannot be reached directly through an URL. They are identified by _ (underscore) before the folder name. It is a collection of pages that are displayed one above each to get a single page. For example: user/pages/home/_header.

Folder Structure

In case of one-page skeleton, you can find this page in the 01.home folder. In this you get a single modular .md file that tells which pages must be included and the order of the pages to display. modular.html.twig can be found in your present theme folder.
In the image below you can see our created folder structure for modular pages.
Grav Modular Pages Every sub-folder must contain an .md file that describes a markdown file.
Firstly you must create sub folders in /users/pages/01.home folder. Next, each folder must contain a .md file and a modular.md file.
When you create the sub folder the image and file both must be in the same folder.

How to create Modular Page

To create modular pages you must follow the given steps.
Step (1): First create few pages in /user/pages/01.home/ folder. In the image below you can see we have created two folders alongwith a modular.md file.
Grav Modular Pages Step (2): To create a modular page you must create a file, in each folder and name it as text.md.
Grav Modular Pages Step (3): Next, add your code in text.md file, save it and run the same.

Example

Save all the four pages as .md file. Here we have created 4 pages and named as text.md, text1.md, text2.md and text3.md.
---
title: Bio-diversity
---

## Bio-diversity

Biodiversity refers to the variety of life. It is seen in the number of species in an 
[ecosystem](https://simple.wikipedia.org/wiki/Ecosystem) or on the entire [Earth](https://simple.wikipedia.org/wiki/Earth). 
Biodiversity gets used as a measure of the health of biological systems, 
and to see if there is a danger that too many species become [extinct](https://simple.wikipedia.
org/wiki/Extinct).
Next, create 4 pages, add them to the \templates\modular folder as shown below.
Grav Modular Pages Next, go to home page and refresh, you can see the changes.
Grav Modular Pages In the new navigation bar you can see the four file links.

No comments:

Post a Comment