Jump to content

Joss

PW-Moderators
  • Posts

    2,862
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by Joss

  1. They are knitted - I will lend you some needles...
  2. Except it will throw an error as I have never build a skyscraper and I don't live in Chicago. But other than that .....
  3. I haven't ever looked at the skyscrapers profile, but the first is listing skyscrapers where the name of the architect is the same as the name of the current page (so finding anything to do with that particular architect) Whereas the second is listing the skyscrapers who's parent page is the same as the current page. So they are both explicit statements but looking for different criteria
  4. Yes, it is effectively a nested array. Call the Page $page Call the page field within that page $page->my_page_field Call the field within the pages inside the page field $page->my_page_field->some_field So, loop trough the first to get the pages foreach($page->my_page_field as $apage){ echo $apage->some_field; } er ... I think. Sorry, i am meant to be composing a track for a client ... I will run off.
  5. In the current version of PW (2.4) with the admin template, there is the facility for an Add New button. You need to set up a parent child relationship with two template - go to the Family tab in the parent template and under Allowed Templates for Children, chose you child template. Go to your child template, and under Family select the parent template for Allowed Templates for Parents. Save On the same tab you should now see Show in the Add-page shortcut menu? If it is not already selected, choose yes. You will notice that there are some useful instructions on the template too. An Add New button will appear above the Pages list that allows you to create a new page using this child template. You can create several of these combinations and they will be added to the Add New button. It will become clearer when you try it!
  6. Just for interest, if the menu is simply sending visitors to anchor text further down the home page (I assume that is how it is working), why would anyone know to go to /about/ in the first place? If there is no link like that on the page, surely that URL wont be indexed by the search engines.
  7. Logout: https://processwire.com/talk/topic/684-client-logout-page/ Forgot Password: https://processwire.com/talk/topic/5869-forgotten-password-on-the-front-end/
  8. Be aware that this is just one way of doing things (and possibly not the best way), just used as a simple example to demonstrate a bit of PW functionality - but it may not be the way you want to lay out and structure your own websites. There is no fixed way of doing this in ProcessWire.
  9. The site settings is just for use in the admin, not to be viewed on the front end, which is why it has no file. It is just one way of collecting together some global bits and pieces which you can then use in any template file in the site. Like the site title, for instance.
  10. This is an excerpt from an ongoing larger work that I am playing with so has a couple of references to things you haven't read - but it might be useful anyway. I notice that some new PW users are a bit confused about how they should structure their site within the /site/templates/ directory, so this is just some general waffle addressing that confusion rather than telling you what to do. Structuring Your SiteHere is a question that comes up in the forum more times than just about anything else: “I need to build a site that will have this bit as part of that bit and will need to have something over there while the bit under here relates to the image that isn't there and the entire lot needs to be static html….” What underlies the question and all its variant cousins is: “Is there a set way to structure the files for my site?” No. To be honest I am pretty tempted to finish this chapter here because that one little word really does sum up the entire point about ProcessWire, PHP, MySQL, Apache, JQuery and anything else that makes this system tick. None of it, including ProcessWire, is about how you want to structurally create your website; they are all tools that enable you to construct your site how you wish. Part of the problem, it seems, lies in the various demos and profiles that sdemonstrate how ProcessWire works and what it does. The very fact that they exist at all means that someone had to build them, and to do that, they had to structure them ... obviously. Developers and designers that have come to PW from other content management systems and who are used to having to follow fairly limiting guidelines automatically assume that the demo they are looking at represents how they MUST put the site together. Then they look at a different demo by another plonker and it is built in a completely different way. Bugger. The PW Templating System Most content management systems have a templating system of some sort or another. Sometimes it is based on a third party markup system, sometimes it is based around the idea of a huge amount of files that if you want to change you have to build overrides and put them in certain directories and then work out how to strip out all the ccs that is still in there. Some of them, particularly the ones that go on about CCK (Content Construction Kit, whoever that is) allow you a ton of versatility as long as you don’t mind that all the fields come complete with huge amounts of pointless nested DIVs and CSS referenced from one of the moons of Mars. Some have had this amazing idea that it is somehow really clever to separate the idea of an overall theme from the way components are laid out and therefore put them in completely unrelated parts of the file structure (some in the core that will be rendered useless at the next update). Anyone used Magento? The joke here is, of course, that none of this is about what a CMS is meant to do, it is about how to display the OUTPUT of a CMS, but somewhere down the line the two have got confused and the Content Management part of the system is now telling the public website part of the system how to do its job. And that brings me neatly to the ProcessWire Templating System. Which doesn’t exist. PW is a true CMS in that it gives you two layers of tools: Firstly it provides a way of storing, managing and processing data. Secondly, it provides an API that allows you to retrieve and manipulate that data. The bit it doesn't do is build your website for your – you are the designer or developer, you are probably the best tool for that job! There are a few rules … well, there is one rule actually, which we covered earlier: template files must have a php suffix and be kept in the templates directory. So, whether you construct your site using header and footer files included into your main templates, or whether you use a delegated approach or just one core template that you use to drag in markup from other files, or whether you use the API directly into a template, or as part of a php function or stored in a separate file, or whether you use jquery, ajax, JavaScript or anything else, this is all up to you and is NOT part of the PW system. It is back to how we started (in the main tutorial) with just one line of PW markup in an empty PHP file. <?php echo $page->title; ?> Now throughout this tutorial I will probably stick to some pretty basic construction – I will tend to use the API and PHP directly into a template file and possibly use an included header and footer just to reduce the amount of markup kicking around. However, this is not necessarily the best way of creating a website in PHP and PW, it is just a nice clear way; that is all. The PW forums have all kinds of discussions on different approaches for using PW and PHP and files and so do forums and blogs all over the web. The very fact that PW does not rely on one particular way to construct a website means that all those ideas from all over the place are perfectly valid and can probably be used in PW. Freedom is a wonderful thing, and so is a proper CMS. Joss
  11. Just for interest, why do you go from Lightroom to PS rather than just export from LR? Or can't you do png from Lightroom and I never noticed... Horst, that add noise trick is really useful. I couldn't appreciate it on my desktop but it really shows up on my kindle - very neat.
  12. Yeah, could have at least fitted it with a tow bar ....
  13. There is already a thread going for this, but here you go: 1. Create TWO templates. Create a template called select-parent and a template called select-option - For this example neither need a template file, though they would need one if you wanted to display these actual pages. Edit select-parent and under family click on Allowed Template for Children and choose select-option. You don't have to do this part, but it does make for neater management. 2. Add to the template select-option two fields Title - well it will have that one anyway Value - this can be any field type. Note: If your title and value are going to be the same, then don't bother with a second field. 3. Go to pages and create your parent page. For this example we will just make this a child of the home page, but it can be anywhere within your tree structure. Click on home and create a new child page. Choose select-parent as the template and call it My Select and save. Optionally, under settings, check the Hidden box to hide this page from the front end. (It will be anyway as it has no template file) Save and close this page. 4. Click on your new My Select page and Create a child page. Make whatever children you need. If you restricted the allowed templates for children, it will automatically use the select-option template, if not, you will need to choose that template. 5. Go to fields and create a new field of the type Page. Create the field, naming it as you need and save. Under the Details tab choose: Single page (Page) or empty page (NullPage) when none selected Under the input tab change the parent of selectable pages to My Select. Scroll down and change input field type to select. Save And that is it. You can now include this page field in whatever template you need. You can add options as you require, but I would be careful about deleting them!
  14. The parent page also needs its own template - you can create one and call it anything you like, I just called mine blank template to make it clear it didn't have any additional fields. It needs a template so you can, for instance, set it to use a specific template for any children. So, once you create a template for the parent, create a page with that template - you will only need the one page, obviously. Then go an add some children to this parent page using the template you created for your selects. When you create your page field, you will then select the parent page as, umm, the parent page! (Clever, huh?)
  15. I must admit I have been fighting CKEditor a bit - I find it harder to customise, but that may just be because I know Tiny better. Also, Tiny 4 really should be evaluated first. It also has inline capability. http://www.tinymce.com/tryit/basic.php The other thing that should be looked at is some of the simpler HTML5/JQuery editors - very lightweight and probably all that is needed for many fields.
  16. When it comes to create a select of any sort, you only need a template file if you will need to display those pages as actual pages, if you see what I mean. What I tend to do is create a template that will be used as a parent (no file, just a blank template), and then create a template that you will use for the actual options. A lot of the time you can just have the title field, but if you need a value that is different from the title or you need more fields for other reasons, just add them. With the parent template, set the family so that it can have children and define the template that will be used for those children. Create a page with the parent template that you want as the parent for your select. Then create some children - it will automatically choose the template you set as the child template. Since the parent template does not have a template file, it will not show up on any menu or similar searches. If you want that to be a bit more obvious on your page tree, set it as hidden as well. Now you can create a page field and that will be your selects. You can even set the page field so that it can create more options - very useful for things like tags. This sounds long winded, but actually, it takes just a few minutes
  17. @bwakad If you just think of a page with a title as just the title (and forget that we are calling it a page) then it does not seem so over the top. This may help: http://wiki.processwire.com/index.php/Page_Field
  18. That bootstrap is old now - it is Bootstrap 2.2 (I think). When I get time, I will do a BS 3 version.
  19. Mine is on github and I update it from time to time. As Adrian said, all the info is in the original post.
  20. Here is a huge list http://www.webconfs.com/how-to-redirect-a-webpage.php using htaccess is probably the best method. Something like Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://yoursite.com/newpage/$1 [R=301,L]
  21. Yes, a couple of us got to here having played with Joomla + Seblod, which I found horribly frustrating. Yes, this does require more actual writing of code than those do, but the result is so much lighter, faster and yet more powerful, that it is quite liberating - especially that once you output your data it is so easy to display it in any way you like, with any framework you like and with any JS or JQuery plugin you want and so on. I will say though that I spent so much time with Joomla and CCKs trying to bend them to what I actually wanted to do, that PW was actually QUICKER to work with. And, of course, any functionality you create will be EXACTLY what the client wants rather than a compromise. Trust me, you will never go back.
  22. Just thinking about one of Ryan's sites where he used two installations - one for input and the other for output (as far as I can remember). Might be overkill, but perhaps worth looking into that approach? Not sure how he did it!
  23. Welcome! Two little questions that have rather large answers, to be honest. First of all, I suggest that you ignore front end for the moment till you get your head round the rest of the process (see what I did there?) The key to ProcessWire is the incredibly powerful APi which allows you to build any functionality - Form Builder is a module that allows you to create front end forms very easily, but they can also be built manually. So, I suggest you do one or other of the tutorials in the Wiki just to get the hang of how the system works and as a very basic introduction to the API http://wiki.processwire.com/index.php/Main_Page Next step is to look at the API (linked on the top menu) and especially the Cheat Sheet. http://cheatsheet.processwire.com/ That will give you a clue to how much is possible with ProcessWire. The point with PW is that it is not quite an out-of-the-box solution like the Drumlapress mob, but it allows you a lot more versatility and does not shoehorn you into one particular way of working. Having said that, it is not a scarily complicated system either - many of us started using it with very little development knowledge, but have found it manageable and we have learned a huge amount. And had fun in the process.(I did it again..!") So, get your hands dirty with the tutorials and then ask any specific questions you need - you will find the people on the forums here are, quite uniquely, rather better than boring old docs!
  24. I give them to Soma to eat .... he is so underfed, you know.
  25. Target blank tells the browser to open a new tab/window Edit: Like wot Diogo said.
×
×
  • Create New...