Jump to content

how to create my own front-end theme?


adrianmak
 Share

Recommended Posts

i studied other theme created by others, beside the theme files sit under templates folder, there is another install folder and with a install.sql file

what is this for and how to create this sql file ?


are there theme developer create commerical themes ?

Link to comment
Share on other sites

Processwire does not have front-end themes, because for every website the front-end is custom made.

https://processwire.com/talk/topic/6653-how-can-i-apply-a-new-theme-to-processwire/

The install.sql contains the default (admin) pages which are needed for the back-end, and some default pages for the front-end (Home, Basic Page, Search, 404)

There is a module to export an entire site profile, this will create an sql export that together with the other file from the site folder can be used when installing new sites with that specific site profile.

Site Profile Exporter

http://modules.processwire.com/modules/process-export-profile/

A good read to get you started

https://processwire.com/talk/topic/4173-grouped-forum-posts-links-articles-tutorials-code-snippets/

  • Like 2
Link to comment
Share on other sites

ProcessWire has no theming system like Drumlapress - basically because it does not need one.

Anything you can do with html/css/js can be used with ProcessWire.

Dead Simple Example:

Create a file in /site/templates/ called mytemplate.php

Go to the admin, go to setup -> templates and add new. You will see mytemplate.php listed. Select it and create the template. It will automatically have the title field added.

Now, go to the front end of the admin, to the pages list, click on Home and then click on New. This will create a new page under home.

Select your new template from the drop down, fill in the title field (for example, "testpage") and save. Publish it.

Go to the front end and go to yoursite.com/mypage/

It will be blank.

Open your mytemplate.php and add this to the top:

<?php

echo $page->title;

?>

Save and refresh the page - you will now see the page title, but with no formatting at all.

However, you can now see that you can add any html formatting to mytemplate.php you like - use a framework like Bootstrap or work it out in dreamweaver, anything. All you have to do is to add the API like the example above to display content for that page.

ProcessWire puts no limits on how you build your site and neither do you have to convert anything to work with it - you can create ANY design you like and not be tied up by someone elses design.

What is more, you can do this by learning only the smallest amount of PHP (like, what you can learn in a morning) and by learning to use the very logical API.

For a more detailed tutorial, go to http://wiki.processwire.com/index.php/Basic_Website_Tutorial

  • Like 6
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...