Leeflets / leeflets

Beautifully Simple Websites
128 stars 29 forks source link

Manage more pages #102

Open pubblisoft opened 11 years ago

pubblisoft commented 11 years ago

It should be nice to change the File name (not only index.html) and manage a main menu from the side editor.

$filename = $this->hook->apply( 'template_write_filename', 'index.html' );

Basically i need to show the index.html folder files and select the one that needs to be changed instead of loading the default index.html.

ian-cox commented 11 years ago

It's no where near ideal but if you make multiple templates you can have the exported html file named after the template that you're currently using. If your template is called portfolio, the html file will be saved as portfolio.html. In the example below I made an exception for the template called home which gets renamed to index.html.

Basically you'd be switching templates in order to edit different pages.

The file to edit is in core/library/template.php

    if ($this->active_template == home){
        $pagename = "index";
    }

    else{
        $pagename = $this->active_template;
    }

    $filename = $this->hook->apply( 'template_write_filename', $pagename.'.html' );

It looks like Leeflets is rewriting over previous html files each time a change is made. Your actual changes are stored in data/content-themename.json.php

I'd love to see Leeflets get real multi-page support!

pubblisoft commented 11 years ago

Thank you ian, we love Leeflets and we'd like to implement an easy page (or template) manager in the front-end editor. We are no longer willing to use complex cms for simple sites. we are happy to show Leeflets credits in the next our sites.

pubblisoft commented 10 years ago

I add the follow rows:

file: core/view/store/templates.php

Templates are like pages... ....

                < div class="section-header">
                    <h3>Installed Templates (site pages)</h3>
                < /div>

....

Page name near "activate" button..

....

<?php echo htmlspecialchars( $template['name'], null, 'utf-8' ); ?> < span>< a href="<?php echo $this->router->admin_url( '/store/activate-template/' . rawurlencode( $template['slug'] ) . '/' ); ?>" class="btn btn-primary activate-template">Activate< /a>< /span>

....

It will be nice to modify the template "meta-about.php" file array items from the front-end directly as template settings (or page settings).

Windaiv commented 10 years ago

I also create website from 5 pages. How to make them on your engine? To create new templates or you can do multipages?