madknight Posted July 21, 2017 Share Posted July 21, 2017 Hi everybody, I am sorry, I guess this is a damn stupid beginner question but: I got a damn good looking html theme - no pw theme! It´s using basic html, css, sass, etc. Now, I´m wondering how I can transform this into the processwire structure. Is there any guide? Haven´t found any yet ... Would be so kind if you can help me ! Regards! Link to comment Share on other sites More sharing options...
szabesz Posted July 21, 2017 Share Posted July 21, 2017 (edited) Hello @madknight and welcome to the ProcessWire Forums, Have you already seen this? https://processwire.com/docs/tutorials/ especially: Installing a CSS Framework How to structure your template files also, in the newest versions of ProcessWire we have Markup Regions: https://processwire.com/blog/posts/processwire-3.0.62-and-more-on-markup-regions/ and Field Rendering: https://processwire.com/blog/posts/processwire-3.0.7-expands-field-rendering-page-path-history-and-more/ I use the above two to better structure my template files. In my setup Markup Regions is used for various page layouts where I can also dinamically add additional script and css files to a given page when needed (e.g. only the home page needs a slider JS and its CSS, etc...) I use filed rendering to render the "Main Content div" and also some fields when appropriate. I also use include when rendering fields is not possible (there are no such fields...), eg.: include __DIR__ . '/../../partials/article-lead-home.php' But there are various ways to do it. Some use templating engines for example, such us Twig, Latte, etc... You can find modules which support working with them more easily. In ProcessWire first you need to figure out your own way of setting site profiles up. It takes time, but it is worth it because you can build your "frontend theme" – which we call Site Profiles BTW – the way you want. Hope this helps. Also you can seach the forum for more ideas. Just use Google like this or similar. Edited July 21, 2017 by szabesz typo 2 Link to comment Share on other sites More sharing options...
DaveP Posted July 21, 2017 Share Posted July 21, 2017 How easy you find converting a static template for PW will depend very much on your experience with PHP. You don't need to be an expert, just comfortable using variables and a few loops. Take a look at the site profiles that come with the PW download, and see how they are structured. There are many different ways to organise your template files - probably as many different ways as there are PW users! Finding a system you are comfortable with is probably the trickiest bit. Take a look at this tutorial specifically, and try to work out how to apply whichever strategy you prefer to the template you have. <aside>I'm sure somebody did a video on converting a downloaded theme but I'm damned if I can remember the details. If no one has, then someone should.</aside> 2 Link to comment Share on other sites More sharing options...
dragan Posted July 25, 2017 Share Posted July 25, 2017 On 21.7.2017 at 10:53 AM, DaveP said: <aside>I'm sure somebody did a video on converting a downloaded theme but I'm damned if I can remember the details. If no one has, then someone should.</aside> This one? 2 Link to comment Share on other sites More sharing options...
DaveP Posted July 25, 2017 Share Posted July 25, 2017 Great call, @dragan! And props to @Philipp (who hasn't been around the forum much lately) for the video. Although the video was done just over 3 years ago, and some things have changed a little bit, it is well worth a watch. (I'm watching it again now.) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now