PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun May 31, 2020 2:04 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Oct 12, 2015 2:25 pm 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 331
Just got started with phileCMS today , Now i have the following as my default template , all pages use the below template(template uses twig),

Syntax: [ Download ] [ Hide ]
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
        <!-- Made with PhileCMS -->
        <meta charset="{{ config.charset }}" />
        <base href="{{ base_url }}/" />
        <title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
        {% if meta.description %}
        <meta name="description" content="{{ meta.description }}">
        {% endif %}{% if meta.robots %}
        <meta name="robots" content="{{ meta.robots }}">
        {% endif %}
        <meta property="og:type" content="article" />
        <meta property="og:title" content="{{ current_page.title }} | {{ site_title }}" />
        <meta property="og:description" content="{{ meta.description }}" />
        <meta property="og:url" content="{{ current_page.url }}" />
        <meta property="og:site_name" content="{{ site_title }}" />
        <link rel="stylesheet" href="{{ theme_url }}/css/style.css" type="text/css" />
        <link rel="stylesheet" href="{{ theme_url }}/css/tomorrow-night.css" type="text/css" />
</head>
<body>
        <header id="header">
                <div class="inner clearfix">
                        <h1><a href="{{ base_url }}">{{ site_title }}</a></h1>
                        <ul class="nav">
                                {% for page in pages %}
                                <li><a href="{{ page.url }}">{{ page.title }}</a></li>
                                {% endfor %}
                        </ul>
                </div>
        </header>
        <section id="content">
                <div class="inner">
                        {{ content }}
                </div>
        </section>
        <footer id="footer">
                <div class="inner">
                        <a href="https://github.com/PhileCMS/Phile">Phile</a> was made by <a href="https://github.com/PhileCMS">The PhileCMS Community</a>.
                </div>
        </footer>
        <script src="{{ theme_url }}/js/highlight.js"></script>
        <script>hljs.initHighlightingOnLoad();</script>
</body>
</html>
 


Now in the sub/index.md file i have the following content:

Syntax: [ Download ] [ Hide ]
<!--
Title: Sub Page Index
-->

### This is a Sub Page Index

This is index.md in the "sub" folder.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies tristique nulla et mattis. Phasellus id massa eget nisl congue blandit sit amet id ligula. Praesent et nulla eu augue tempus sagittis. Mauris faucibus nibh et nibh cursus in vestibulum sapien egestas. Curabitur ut lectus tortor. Sed ipsum eros, egestas ut eleifend non, elementum vitae eros. Mauris felis diam, pellentesque vel lacinia ac, dictum a nunc. Mauris mattis nunc sed mi sagittis et facilisis tortor volutpat. Etiam tincidunt urna mattis erat placerat placerat ac eu tellus. Ut nec velit id nisl tincidunt vehicula id a metus. Pellentesque erat neque, faucibus id ultricies vel, mattis in ante. Donec lobortis, mauris id congue scelerisque, diam nisl accumsan orci, condimentum porta est magna vel arcu. Curabitur varius ante dui. Vivamus sit amet ante ac diam ullamcorper sodales sed a odio.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies tristique nulla et mattis. Phasellus id massa eget nisl congue blandit sit amet id ligula. Praesent et nulla eu augue tempus sagittis. Mauris faucibus nibh et nibh cursus in vestibulum sapien egestas. Curabitur ut lectus tortor. Sed ipsum eros, egestas ut eleifend non, elementum vitae eros. Mauris felis diam, pellentesque vel lacinia ac, dictum a nunc. Mauris mattis nunc sed mi sagittis et facilisis tortor volutpat. Etiam tincidunt urna mattis erat placerat placerat ac eu tellus. Ut nec velit id nisl tincidunt vehicula id a metus. Pellentesque erat neque, faucibus id ultricies vel, mattis in ante. Donec lobortis, mauris id congue scelerisque, diam nisl accumsan orci, condimentum porta est magna vel arcu. Curabitur varius ante dui. Vivamus sit amet ante ac diam ullamcorper sodales sed a odio.
 


great , now my page is generated with i hit localhost/phileCMS/sub

now what if , inside sub , i had the following files.

Syntax: [ Download ] [ Hide ]
`one.md`, `two.md`, `three.md`
 


And what if each of those pages had a carousel that has 3 sliders each, and each page has to have different sliders(obviously). What would have to modify now ? The main template ? pass the specific images from the *.md files ? I am a bit confused as i have never used a flat file system before.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group