How can I create several directories …

Feed 4 posts, 2 voices

Avatar
1 posts

I’ve searched a long time for an easy understanding CMS like “Frog CMS”. These are my first steps.

The job:
I want to create several directories like “about”, “products” and “contact” … In these directories I want to publish several pages. For example:

about/
… index.php
… facts.php
… history.php

products/
… index.php
… product-1.php
… product-2.php

My approach:
Test #1: At “Pages” I’ve created a page “about”. Then I wrote a page “facts” and moved it to “about”. But it does not work, when I view the website! :-/
Test #2: Then I set the page type of “about” to “archive”. But it does not work, when I view the website! :-/
Test #3: At “Files” I’ve created a directory “about”. But at “Pages” I can’t edit pages in this directory, because this directory is not shown.
Test #4: At “Files” I’ve created a new file “index.php” in the directory “about”. I can edit the page “index.php”, but I can’t use layouts and snippets like at “Pages”.

My Question:
Is it possible, to create directories and manage, edit and publish several pages in this directory at “Pages”? How?

Please help me :-)

Sorry for my bad english :-/

 
Avatar
1493 posts

Hi Boulevard, and welcome!

Have you looked at how things work in the default installation? I think you might be making things more difficult for yourself than you need to. You don’t need to create any “*.php” type pages. The default install gives you a page structure something like this:

Home Page
  |- About us 
  |- Articles
        |- %B %Y archive
        |- My second article
        |- My first article

To add your “Facts” and “History” page, just click the green “+” icon beside “About us”, and you can create those child pages there.

You can drag-and-drop pages if you want them in a different order.

For “Products”, just click the green “+” icon beside “Home Page”, and add it there. And so on. Hope that helps!

 
Avatar
1493 posts

Then I set the page type of “about” to “archive”.

Only use the “archive” page-type if you want blog-type entries. If you just want a “tree” of pages, leave the page type as --none--.

At “Files” I’ve created a directory…

Only use “Files” for proper file management (e.g., images, PDFs, etc.) Create all your front-end pages under the “Pages” tab.

Maybe playing with the default installation a little longer would help! ;)

 
Avatar
1 posts

Hi David,

thanks for your fast help!

Now it works! Cool :-)

I’ve created a directory “about” with page-type “none”. Then I’ve created several pages in this directory. It really works :-) It was so easy. Shame on me :-/

But one question left:

The pages are working, when I wrote “/about/index” and “/about/facts” in browser address bar.

But, when i add a suffix, – I’ve tried “.php” and “.html” – it doesn’t work.

What’s that?

 
Avatar
1493 posts

But, when i add a suffix, – I’ve tried “.php” and “.html” – it doesn’t work.

You need to find the config.php file in Frog’s root directory, open it for editing, and find these lines:

// Add a suffix to pages (simluating static pages '.html')
define('URL_SUFFIX', '');

It will be near the end of the file (lines 34-35 in my latest version). Just add there whatever suffix you want your pages to have, and it will be added automatically. E.g., if you want “/about/facts.html” then change line 35 to read:

define('URL_SUFFIX', '.html');

Glad Frog is starting to work for you!