Jump to content

bwakad

Members
  • Posts

    450
  • Joined

  • Last visited

Everything posted by bwakad

  1. You are right, - like me - many have ask this. It takes us a long time to think 'out of the box' coming from joomla, wp or any other similar cms. But even if you mention, any site has a different structure, it still does not tell newbies where to start. In fact, I made the mistake starting from foundation site profile - which of course is good. But the logic that goes around in skyscrapers is more meant for me being a newbie. So, what I am doing now is write everything down in a tabel: Parent: Admin>template: name | label | field(s) - Admin>page: name - Server>templates: filename - and front-end menu item Children: Admin>template: name | label | field(s) - Admin>page: name - Server>templates: filename - and front-end menu item In this way I can see the connection what's going on and especially where it would be called and displayed. For instance, I renamed the field "architects" to "companies". I then had to resemble this change in setup>template>architects - and under input-tab, renamed the architects.php as well. The field also uses a selectable parent page named "Architects" I had to rename that through >pages to. Since my menu item was called "Architects" I had to search where this was taken from, it was in _out.php, so I changed that. Of course since some things change - especially in php, you need to open up all files to find reference to this fields - but long live sublime! So, practise is good for learning. And I think this is what people mean when they talk about structure: fields (back-end) are used on templates (back-end); pages (back-end) use templates (back-end), and contain content; templates (back-end) use most-of-the-time .php files on the server in templates folder - those on the server display content; and if you look at the back-end - setup>templates - advancedTAB - under 'rename' only then you will find out which actual .php file is used. from there you need to - kinda like - backtrace the steps. For me this works, but of course you would need a working example like skyscrapers - no disrespect to other site profiles. And by the way, I really had to think differently: processwire "site profile" - is called template/theme by other cms; processwire "templates" in topics/tutorials are usually those in the back-end - but many times it is not clear - and that is where confusius starts to fog our mind.... processwire "pages" - is just an entry in the DB.
  2. As I am experimenting from the skyscraper site profile I managed to change a few things - menu, fields, selector, and other things. Now I ask if there is some kinda module like the CSV import module, but just to rename? or is the simplest way to remove and just import new ones? Since the pages are with content, it would be nice to keep it for now.
  3. Just to make it myself more clear I installed skyscapers in another localhost folder - and it almost make more sence to me. Regarding the _out.php file, does this code mean the url is set to root and just append the hardcoded text cities after it? Where does it get the / from the browser url just after the root? <li><a id='topnav_cities' href='<?php echo $config->urls->root; ?>cities/'>Cities</a></li> It then goes to cities.php include("./browse.php"); and as it says include browse.php $headline = "Skyscraper " . $page->title; $browserTitle = $headline; $content = $page->children("limit=100")->render(); The first two lines are obvious to me, but the third one is a question... how is the sytem knowing it need to collect cities pages - in this case? Is this because of $page represents "cities" from the url in _out.php? Seeing how this Skyscrapers is working I guess I have to make seperate template files for each entry: jobs - province // in admin template with fields: - city - company - branche - skill jobs - city // in admin template with fields: - province - company - branche - skill jobs - branche // in admin template with fields: - province - city - company - skill
  4. From what I have seen on my server folder I have several files located under templates (I use ProcessWire 2.4 with foundation 4 site profile): _inti.php It has this code (removed all comments from it for readability): <?php $browserTitle = $page->get('browser_title|title'); $headline = $page->get('headline|title'); $body = $page->body; $side = $page->sidebar; $body = str_replace( // find these: array('<h2>', '<ul>', '<ol>'), // and replace with these: array('<h2 class="subheader">', '<ul class="in">', '<ol class="in">'), // in the $body text $body); $useMain = true; $homepage = $pages->get('/'); require_once("./_nav.php"); So what I understand from this is that it collects the title and displays that in the browser search and as the headline. Then it sets the variables for body and sidebar parts. I guess $useMain means it will use the _main.php as a template file. And then it set the / for the url part. It then includes the file for navigation. _main.php In this file probably all the stuff go on...Some topics mention head.inc and footer.inc, but I have it in one file. Inside it has parts for: <head></head> <body> <aside></aside> </body> <footer></footer> And the question becomes with this code: <?php echo renderBreadcrumbs($page->parents); echo $page->select_sector->title; // this was just for testing a select value echo $body; ?> If I want to collect data on this page, where to do this? basis-page.php only has this code, and I really have no idea what it is suppose to do, I do know that some pages in the admin back-end use it as a template: <?php if($page->numChildren(true)) $body .= renderBodyNav($page->children); home.php I guess, this page is meant to be the front/home-page? But do I need to remove this file or just some code? <?php $body .= renderOrbit($page->images) . renderBodyNav($page->children); /* * Check that required settings are in place. * Feel free to remove this if your site already works. * */ if($config->prependTemplateFile != '_init.php' || $config->appendTemplateFile != '_main.php') echo ' <h2>Please edit your /site/config.php and set:</h2> <pre> $config->prependTemplateFile = "_init.php"; $config->appendTemplateFile = "_main.php"; </pre> '; The big question is this, If I wanted to have a link which collects from BrancheA>Jobs: Do I need to make a template file (server side), which collects all data from Branche+Jobs? Or do I need to place this code inside already present files mentioned above? I made already a select Branche using pages with page field. But don't know how to continue.
  5. Hello all, Sorry to bother you all again - but I need help from the guru's here! Normally I would have a table with fields for example like: company | city | job job | skill | contract | city In the front-end I would normally have links which could point to those tables Since there are relationships in a database - I understand I have to see a page like a row in the database - but then how do I need to look at this: displaying the page company | city | job - all in one template? What is the best way to combine certain selects (pages) from back-end to front-end? Judging by the fields I mentioned, I would need to make 5 selects (pages), meaning around 120 pages - no problem there. So I eventually need to combine those fields in different ways to make a link: I checked my first select field out, and noticed if I use menu>search I do get the result back as a link. But the link goes straight to that page. I had the impression all links would lead to one-page only - a template file on the server that displays results from this link! So I am not talking about the front-end in regards to css and all - but more talking about what is the best way to set up select, text, and other fields - and how to acomplish what I need.
  6. I installed this and my question is: the suffix for the child page - is it editable after creating? What exactly can I do with this module? I need for example many selects, and I need to make main pages and sub-pages for a page-field type to have a select on: Province City Branche Company etc. All with near 20 values. ps. it would be nice if the Parent Page could also be created on the fly!
  7. Hello, I have seen somewhere on the forum a link which said that like the normal CSV import module - which I found in the Modules link from Menu, that there was another one and it could generate all in one automatically. But unfortunately I did not bookmark the link. Does anyone know where to find it?
  8. Hello all, I am sure someone must had this before. I have a select field with options holding values from page titles. My page title/name is for example: "this is my page"; I use echo $page->fieldname->name and the value; the returned output is: "this-is-my-page". Is there somewhere an option I have to use to make it normal spaces?
  9. that did only one insert: the last one. Do I need to specify each line like this: text1, text2, etc? Solved: I had to specify the header first, like: title text1 text2 text3 etc
  10. So finally, with help of others including Joss, I managed to get a select to work... Other people were also mentioning this module. And it's probably what I need considering I need to have select options for at least 30plus values. But how to set up the cvs file since I only need 1 e.g. title?
  11. My mistake. In the cheatsheet I noticed $field->name So I went along and tried this: echo $page-select_branche->name; and that works! Many many thanks for everyone who wanted to stay patient...
  12. Thanks, this explanation was very very clear. You are really patient! I finally added the field to my template from within the admin, and used in the template FILE on the server echo $page->select_branche; But in front-end it is being outputted as numbers. Do you know where I have to go to fix this?
  13. After reading some topics and watching the video page field, I am not following the concept of making a select at all... In Admin I did the following: I created a template called "Selects"; I created a page called "Branche" and 2 children called "yes" and "no"; I created a page fields type called "select_branche" and used the "Branche" page as parent; In the admin under pages > settings, it has an option called template, and it has "Selects" as default. Do I need to make this my normal template from site profile??? which can be "basic-page" or "home"...? Then it also says in the wiki: Add this new field to your template in the usual way. But what template are we talking about??? And what is the usual way? echo $select_branche; ps. I am using PW2.4 with foundation 4 site profile
  14. I understand what you are trying to tell me, but still it is not very clear: 1. I made a new template from setup>templates>addnew 2. I added those two fields as suggested in the wiki - the normal title field and a text field called select_value 3. I created a top page - Selects and here is where I get confused: in this page under settings I see template* name-of-template (from step 1)... Now, what/where is the blank template? I really feel stupid now. lol
  15. Yes, I was also reading a tutorial joss wrote earlier, they are almost the same. But then it confused me to: Do I need to add a file in the templates folder on the server, OR add a file in the admin part under templates? Then it says 'blank template' but I really could not tell what is meant by that... As for the video page field: I followed those steps in the video, but how to display in the .php template file? I looked into the cheat sheet but did not find which is outputting what?
  16. After reading this topic I have some questions, I am fairly new to processwire and still trying to bend my head around it: I need a select field, large quantity of options, able to change it's values in admin, reflect the changed in front output after a change. In this topic it is recommended to use page field. Some say make pages - but that would mean I have to create a page for every option - and I need at least 30. Or are there other things available? For example: brancheA (option/value) - and clicking a link to BrancheA - would display a (search) page with list of items under that branche etc.
  17. Hi, thanks. I did however change to the foundation 4. Right now I try to see how the structure is (template/pages). The idea is to have a job site with javascript/svg maps for easy searching. Did it with OSClass in the past. But that software is actually lacking of fields adding / search / filtering / css (last one is really not good). So my first task is to create the pages: Frontpage as usual with possibilities, and main map. For main search links I use the menu e.g. pages. Then I have to create a front-login and user groups. After that I need to have the submission for entries. In the foundation example text it says: Each of the template files in this site profile includes the header template (head.inc), outputs the bodycopy, and then includes the footer template (foot.inc). This is to avoid duplication of the markup that is the same across all pages in the site. This is just one strategy you can use for templates. but there are no such files...?
  18. would anyone be so nice to give me the proper latest link to the site profile from this topic? I see so many links from different users, it's hard to see a difference. By the way: I like the 'mobile' menu from processwire/modules/foundation4 (but I like to use the latest foundation)...
  19. Silly me, all the time I was thinking foundation was a site profile. lol But after reading through the comparisation links I find foundation more to my needs. I only need 2 or 3 columns... I also like the idea of resizing columns and especially the rem unit. Comes in handy if you have a site where print will be important. Other then that, since I did not know LESS, I might as well learn SASS...
  20. Instructions says: This module's files should be placed in /site/modules/ProcessWireBootstrap3/ Instructions link says .module file???: Place the .module file in your /site/modules/ directory. If the module contains more than one file (like supporting .css or .js files for example), it should be created in it's own directory under /site/modules/ with the same name as the module. For instance, the AdminBar module and supporting files should be placed in /site/modules/AdminBar/. should I include the install folder, or is this one for a full site install??? Readme says site-default: This is a site profile for ProcessWire. Install as usual: Download the latest ProcessWire Before installing, replace the following directories from the installation with this profile. Replace /site-default/install/ Replace /site-default/templates/ Install ProcessWire. And the zipfile is named: processwirebootstrap3-master Inside: install and templates folder So wich one is correct? please don't tell me all !!! lol The reason I am asking, I am still thinking wordpress joomla wise... and the naming convention in processwire zip files are not reflecting the textual descriptions.
  21. Well, you all so helpful great links! I have no trouble diggin in php. I actually like it. I also had the feeling Jooma and whatever you put on top/inside never seems to integrate the way it should be. Worked on seblod, fabrik, cobalt, etc. And yes. You always end up having to change just too much. But before I do look into the last links provided: I installed skyscraper just to see how everything works. I found out, it is not responsive (CSS), and I would like to start with a bootstrap (responsive) if this is available. Does anyone know where I can find such a template?
  22. Thanks for your answer. I noticed how much is possible with this software. Coming from WP and Joomla, I actually was searching for other software until someone mentioned processwire in a topic about cck's. The approuch that - not only - views, are self made is an advantage. I was getting tired about changing all the css templates and files because of Jooma + template + component working against eachother. I will look into your mentioned links/topics.
  23. I installed the skyscraper to see how it looks and all. But I do wonder... 1. In any CMS you would have a front end login or register. Is this available in processwire? 2. A front-end submission form would also be nice, but the only one I see is the payed one. Are there more options available? thanks
×
×
  • Create New...