flyerdave Posted September 18, 2013 Share Posted September 18, 2013 Hi to all I have just down loaded PW to a local WAMP server in order to try it out. The install was very quick and easy - thanks A little background if I may. I am not a developer or coder and have been used to Joomla (got tired of constant revisions that do not migrate very well) and more recently Wordpress which is great but I only want CMS for sites, not interested in blogs and comments. So I have been looking around for a way to set up a site that is clean, simple but looks good and can handle many pages (1000's). The site in question is Poland Explorer The design (theme) I have is fine but it is also designed for other things that I do not use and so the speed and efficiency is affected by extra code that is sitting there but not used. In other words the site is slower than it need be. PW may be my answer but I am a little confused at the moment and need some help from you good people. Let me explain why - The WP theme I am currently using has the following files, 4 folders (framework, images, js and languages) and 25 PHP files and 1 CSS style file. How do I convert the WP theme into PW so it will look the same as it does in WP. Where and what files do i place into PW? Please accept my apologies as this will be obvious to most if not all of you but I am use to just uploading a theme/template and letting Joomla/WP do the rest. I have some very basic knowledge of html/css and will work my way through the files in the future to weedout the bits I do not want, but for now i would like to find out how I can transfer this theme to PW. Thanks Link to comment Share on other sites More sharing options...
kongondo Posted September 18, 2013 Share Posted September 18, 2013 (edited) Hi flyerdave, Welcome to PW and the forums. PW "template files" are nothing more than HTML interspersed with some PHP to output the dynamic content. There are various ways to convert that theme for use in PW. One way is just to copy the output HTML by viewing source in your browser. Then, you would strip that of all dynamic content and remain with the skeleton HTML. Maybe you could also do this directly from the WP theme PHP files but am not sure. It has been a while since I looked at WP themes. All I remember is that they are a nightmare! I highly doubt you will need all those 25 PHP files in PW! After this, you will have to decide how to output those dynamic content of your site. Those would either be whole pages or fields of certain pages. I would say converting the theme for use in PW should be the least of your worries. You should instead concentrate, in my humble opinion, on learning the basics of PW. In order to make best use of the system, you will have to know some very basic PHP. Have a look at the following topics in the docs: http://processwire.com/api/variables/ http://processwire.com/api/selectors/ http://processwire.com/api/templates/ This will require some work and willingness to learn on your part beyond the point and click common in other CMS. On the other side, great rewards and total freedom await you if you are willing to overcome this initial hurdle Edited September 18, 2013 by kongondo 6 Link to comment Share on other sites More sharing options...
flyerdave Posted September 18, 2013 Author Share Posted September 18, 2013 Thanks for the good advise kongondo - I have found the following http://wiki.processwire.com/index.php/Basic_Website_Tutorial and will work my way through it. i do not use all the objects of the theme so once i have learned how to create under PW I will consider if it is worth the time and effort to transfer the 500 pages i already have on WP. Link to comment Share on other sites More sharing options...
adrian Posted September 18, 2013 Share Posted September 18, 2013 If you are converting from WP to PW you should look at Ryan's case study here: http://processwire.com/talk/topic/3987-cmscritic-development-case-study/ 2 Link to comment Share on other sites More sharing options...
pwired Posted September 18, 2013 Share Posted September 18, 2013 continue here: http://processwire.com/talk/topic/1041-raydale-multimedia-a-case-study/ http://getsymphony.com/discuss/thread/79645/ 2 Link to comment Share on other sites More sharing options...
flyerdave Posted September 20, 2013 Author Share Posted September 20, 2013 Further to this thread i have found a plugin within Wordpress that takes the WP site and makes it into a static html site. Could this static html site be transferred to PW? If yes how please. I am sure it would be of interest to a number of others. I have uploaded the files of this static site here, if anyone would like to have a go at converting them to PW. I will have a go myself but am very new to PW so would appreciate some help. wp-static-html.zip Link to comment Share on other sites More sharing options...
Martijn Geerts Posted September 20, 2013 Share Posted September 20, 2013 Please re read kongondo's post. There's everything you need. Link to comment Share on other sites More sharing options...
Macrura Posted September 20, 2013 Share Posted September 20, 2013 @flyerdave - having recently converted a very complex wordpress theme into something that could be used for processwire, i think i might be able to help you simplify the process; first thing is you'll need to have a working install of the actual wordpress theme running on wordpress; then the next step is to look at the generated markup; from there you'll be able to figure out how to structure the pages, including the head and foot (depending on how you do that - for example if you are using the default profile, you would place the header code in the head.inc file and the footer code in the foot.inc files). it was so much easier than i thought it would be once i stopped looking at the wordpress theme files; i did look through all of the WP files for the theme i was converting, to see how they were handling certain output, and was able to sort of convert that thinking into a processwire model. my version actually runs way faster and has way more flexibility that the original wordpress version and can do a lot of tricks that WP people would be scratching their heads over... i'll be posting it in the showcase soon; 2 Link to comment Share on other sites More sharing options...
flyerdave Posted September 21, 2013 Author Share Posted September 21, 2013 Thanks guys for all your help and advice but I will have to think about this for the following reasons. 1. My tech knowledge is not that great. 2. My site already has over 500 pages and without a script I can see that this may take some time not only to learn PW but to strip the elements out of WP that I no longer want or need such as the blog side of WP, comments etc. 3. I have already moved my site from Joomla to WP and even though I used a script it took me a lot of work and several weeks to transfer and find the right theme that I wanted. I make full use of tabs and toggles in WP and have no idea how I would do the same in PW. 4. I know that my site in WP is slowed down because of all the extra elements both in the theme and WP itself and it may be better if I have a go at removing those before thinking of moving again. 5. Although I enjoy the designer role, my site is about the country of Poland and writing about the places but I find that much of my time is spent in administration duties which sometimes leaves me with little time to write content. May be i should be thinking of going back to good old fasioned html static pages like I use to do with copy and paste as my main tool? (a pain though if you ever wish to change the design). Time will tell. Link to comment Share on other sites More sharing options...
apeisa Posted September 21, 2013 Share Posted September 21, 2013 Keep in mind: If you don't enjoy or don't want to spend time to learn site building and want to focus on content, then I would suggest using some website tool like squarespace etc. or having friend or collegue who does the maintenance work. But if you do want to learn new tech, then we are here to help. PW is great tool to learn site building "the right way" 1 Link to comment Share on other sites More sharing options...
purwa Posted September 21, 2013 Share Posted September 21, 2013 Hi FlyerDave I found this tutorial is very useful when learning PW, I'm not an PW expert but I'm always have this http://cheatsheet.processwire.com/ opened when building/templating processwire. with my limited php as I'm more of designer than programmer all I need (for now ) is foreach, if/else, and of course echo. hope this help and sorry for my English. Link to comment Share on other sites More sharing options...
diogo Posted September 21, 2013 Share Posted September 21, 2013 You would need a script for sure for importing data. But you have to divide the task in three: 1. Build the "site theme" in processwire. This is not more than identifying all the different pages on the website, divide their html by templates and replace the dynamic parts. 2. Mirror the website structure in the PW tree. 3. import the previous content to the new site. Your site seems to follow a very simple structure (not too different from the default PW website, so you can take some ideas from there), I would say 5 templates maximum: Home, basic-page, blog, contact, site-map. Header and footer would be the same in all templates, being that home would have a subheader (very easy since that one just follows the header in the markup). basic-template would need only two fields: body and headline and and title (this is for mirroring the website as is, although with processwire you could actually make the content richer by creating more specific templates. But let's stick to mirroring the website for demonstration purpose). The structure could be something like: Home (render "Poland" page) -- Poland (headline: Poland Explorer Travel and Tourist Guide) ---- About Poland Explorer ---- How to use Poland Explorer ---- ... -- Provinces (headline: Provinces of Poland) ---- Poland Explorer Travel and Tourist Guide ---- About Poland Explorer ---- ... -- Geography (headline: Geography of Poland) ---- Map of Poland ---- Mountains of Poland ---- ... -- History (headline: History of Poland) ---- Heads of State of Poland ---- Katyn Forest Massacre ---- ... -- Other Activities ---- Aviation ---- ... -- Blog ---- Article 1 ---- Article 2 ---- ... -- Contact&Search -- Sitemap (hidden from navigation) The basic template would be something like this: <? php include('head.inc'); php include('sidebar.inc'); echo $page->headline; echo $page->body; php include('footer.inc'); Yes, that simple! sidebar.inc would be something like: <div class="column fourcol"> <?php include('search.inc'); <h4><?php echo $page->headline; ?></h4> </div> <div class="widget widget_nav_menu"> <ul id="menu-provinces-of-poland" class="menu"> <?php $children = $page->children->count ? $page->children : $page->siblings; foreach($children as $c) { echo "<li><a href='{$c->url}'>$c->highlight</></li>" } ?> </ul> </div> ...and so on. There are plenty of examples in the default site that would fit very well in practically all problems you would find. The importing part is well covered in Ryan's post that was linked above. 3 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