-
Posts
2,862 -
Joined
-
Last visited
-
Days Won
47
Everything posted by Joss
-
Thanks Nik, So does it require a relationship unless it is called by id? The bit in the WIki I am working out is all about calling in pages (and rendering them) into another page. http://wiki.processwire.com/index.php/Including_a_page_in_another_page (only part done) So for the moment I am covering: Calling in a single page and rendering it directly in a template file. Calling in a single page via a "Page field" and rendering it Calling in a series of child pages and rendering them directly in a template file Calling in a series of pages via a pages field and rendering them. I have 2 and 3 sorted, have not thought about 4 yet and am a little puzzled by 1. I am being careful to explain in which circumstances if you move a page, you mess up your system, and when it is okay, for instance calling by ID.
-
Sorry, very quick and silly question. On a template, how do you call in a specific page and render it? I know you can call it by id <?php echo $pages->get(1036)->render(); ?> And I know you can get the children, But can you call it just by name? This is for the wiki. EDIT: And another question, is there a way of finding the page ID other than editing it? (And getting the ID from the address bar) Joss
-
If you are using bootstrap, you can get extra, idiotically clever. You can call in your blocks into a bootstrap row as children in your template, and loop through them, limiting them to 4 results, perhaps. Then set the container for each block to style="span3". Now, in your pages list in admins it will take the top four blocks in the list and put them horizontally across your row (though this is responsive). Since you can move pages around you can choose which is the first four. OR You can create a page field to include in whatever template and use AsmSelect setting (on the input tab). That will allow you to multi select blocks AND reorder them from a list. So basically, you can do what you like - the API is very versatile, or perhaps I should say, it is very non-committal and therefore allows YOU to be very versatile. Joss
-
Hi Soma The wiki is, or can be, very useful for the moment. It is a good way of getting information all in one place. Once a good amount is in there, then those who are brave enough can start putting together something a bit more logical and solid - and yes, with ProcessWire! However the more refined version is written, it should also be available in several formats - some sort of searchable help system, PDf/Book style, Kindle, etc (not sure what the etc is...) Joss
-
Hi Henriette I have done a similar thing on a site I am currently working on. There are a lot of ways you can do this. Here is a very basic version: Create the fields for your three blocks - call them Block Title 1, 2 & 3 and Block Body 1, 2 and 3. Create a template that includes these fields. Now create a new page Called "My front Blocks" (I am being really predictable here) and use your template. Go to Settings on the page and make it hidden (it should be published, however). Now fill in your information. That has given you the block content. You now need to call it into your footer. In each position You need to call in the fields from My Front Blocks: <?=$pages->get("/my-front-blocks/")->block_title_1 ?> <?=$pages->get("/my-front-blocks/")->block_body_1 ?> And so on. I leave the layout to you! You can do the same thing with a lot of other info while you are about. I create a page called Site Settings (with a matching template) and I put things like meta keywords, banner, blocks, site title, reusable phone number, anything that I may want to use all over the place. And then just call them into a template. Getting really clever If you want to go completely mad, you can create blocks template ( and associated blocks.php template file) and then create lots of blocks as pages, preferably as children to a hidden page like "blocks" In your Site Settings template or where ever, you can then create a Page field type for each block (choose single and null on the details tab) and set the parent to Blocks and the field to select - a drop down, basically. Now, one your Site Settings page, you can use the dropdown to choose which block you want for each position. Your blocks.php template file will take care of the layout of the block information, you just need to call the pages fields into your footer. For instance: <?php echo $pages->get("/site-settings/")->name_of_pages_field->render(); ?> The render() will then render the entire contents of the blocks page. Does that help? Joss
-
I think we will keep it to just one set of syntax - I get confused enough as it is! Joss
-
Nico, for what? For media wiki it is [[This Page]] or [[This Page|This is my page]] for an internal link to a page, [[:Category:My Category]] for a link to a category within text, and [http://something.com|My Link] for and external URL Or am I misunderstanding? Joss
-
Little Update So, on the help page there is some basic instructions about categories and templates. I have added a simple right sidebar template that you can use for little side notes. Might be good if you want to give a very short howto to accompany the long, detailed version you had just written. Giving a little thought to redirects - for instance I have created a page called Select Field that redirects to Page Field - might help someone who is knew to the system and is wondering where the select field is! I have listed all pages on the front page - when the list gets too long we can remove this, but it might help people to see what is there which they may want to help with or what is missing that they may want to add. I have been putting categories as a sub categories to Processwire to make listing easier later on. Er... that is about it. Oh, started some waffly thing about pages ... like the jokey one I wrote, but without the jokes! It is just an overview - detailed howto will be separate and flagged up at the top of the article so people can move on in a hurry if they want http://wiki.processwire.com/index.php/Pages_Overview Joss
-
Very clean and nice! Suits the subject perfectly!
-
One of the reasons that a Forum can get overwhelmed (which can lead to posts getting unanswered and the forum feeling cold), is because users, especially new ones, are having trouble getting to grips with the system. And that is normally a failing of Documentation. Documentation is the Hell waiting for every open source project that does not have gratuitous funding sitting behind it - so most of them. Some projects (Joomla is a great example) produce huge amounts of Documentation, but the mix of very technical articles with some more useful bits shoved in the cracks can make it daunting. In consequence, the Joomla forums are stuffed with dead simple questions (often with rather confusing answers) that are the first thing that pop up on Google when you go searching for your particular problem. Open Source is not alone in this - I would argue that both Microsoft and Apple suffer from similar problems. The ideal solution is to make sure that the primary documentation is weighted to the "how do I do this?" Sort of writing. How to I change my site title? How do I change the background colour of my home page? How do I create another user? How do I give my image a caption? How do I get the cat fur out of my disc drive? Even when the question does not make complete sense to the system (like the second question) it will get asked. So, "The back ground color of your home page is set by you by creating your own look and feel. Read 'how to make a template' for more....." The real test is Stackoverflow. The site is completely crammed with questions that are not answered in the docs of the software sites, or are buried so deeply or written so obliquely that they are impossible to work out. "The refractive nature of the landing page of your dynamic web application has implications to the coding criteria implicit in the opening statements of your primary head of page include. Thus, a proprietary approach must be undertaken as part of the design policy and fabrication so that the appropriate tonal qualities can be defined and stated with a style classification ...." People write stuff like this! (And get paid for it, Yee Gads!) While the ProcessWire community is small, happy and generous, this is the perfect time to sort the problem out before it happens - simply by creating great documentation that not only gives expansive answers to deep questions and technical information for those that need it, but also spends lots of energy answering the little questions that come up time and time again. Then, when it all gets busy, new users can be faithfully pointed to the right page in the manual and not only get their question answered properly, but get to enjoy the whole experience that much more (and not have to suffer from the poor, over worked moderator who is answering the question for the 50th time that day) Here endeth the advert for the Wiki! Joss PS: Another idea that can help is what I call "half an FAQ" (or perhaps a Q)- Basically, it is a huge list of searchable questions which are then linked to the right bit of the documentation The reason for this is to encourage users to use the docs rather than fragment the information all over the place. It also keeps the doc writers on their toes making sure the questions actually get answered!
-
This is certainly a refreshing place. A lot of this is to do with Ryan who communicates naturally and clearly - far too many developers are reclusive or very possessive of their baby and have real problems climbing out of their cave into the wide world. For someone like me who does not have the background knowledge to use frameworks to the full much of the time, this is invaluable because I do not worry about looking idiotic by asking silly questions. So I learn and therefore am tempted to give back. A lot of other open projects could learn from that ever so simple bit of good psychology and very good marketing! Good on yer, guys! Joss
-
Yep, definitely superfluous! I will start putting some of my bits in over the weekend - all in the Drafts category for the moment. See if we can get this little project rolling. Joss
-
ProcessWire Conference 2013 / London / Cambridge
Joss replied to ryan's topic in News & Announcements
London ... has to be the Toucan in Soho street - a tiny, cramped, smelly, basement but the best Guinness in London. They also do an amazing pre 1960 Middleton special whiskey (if they have any left) - as long as you don't mind payout around £30 a shot or so. Me and that Whiskey had a bit of a reputation there about 14 years ago. Had to ware the shades ever since .... I also lived for a while in Cambridge but my liver was having some serious survival issues! (Note, I am now a very sober, peace loving soul living in a small town overlooking a nice green!) Edit: I mean Carlisle street - grief, my memory! -
Ah good, it will be sorted for others who were on there then. Can you see whether you can upload images? I forgot to check that one .... Joss
-
Hi Dave Yes, it seems that when Ryan sorted out the spam issue, the rights got changed. I got him to set up a new group so there was a specific trusted users group, but I cant change a users rights - you will need to plead to Ryan or someone that has Bureaucratic rights to change you (and everyone else at the same time, probably) In the meantime, you can collect things together or let me know anything I can do or post stuff in this thread for safekeeping ..... Joss
-
Hi Exceptionz There are two things that can happen: Working out the layout (there is nothing to change as there is very little in it) Getting content in Both can happen at the same time. As I said above, I have created the categories Drafts and Pending. This means users can enter articles into those categories even without a final structure getting agreed; these articles can be moved to more useful categories later as things get sorted. The reason I have done this is because I don't have enough time to run the entire wiki, but I do have some notes which I want to put in as I suspect a lot of the more experienced users have (I am just a beginner here!) The more experienced users will also have a better idea of category headings, I would think! If you want to add stuff, ask Ryan initially - though I think he might be away for a few days. Joss
-
Well, now, my background is wonderfully confusing. But out of the many things I have done over the years, one of them was producing radio shows.... Maybe we should do an interview with Ryan via Skype or something ....
-
Great module! I have one itsy-bitsy problem with it which is to do with the way I have been constructing templates. My "templates.php" files are all in the template directory (obviously) but their inner workings are in a directory called "includes" and I can't get to them. Would there be anyway of being able to access subfolders? Joss
-
I have just dipped my toe into the large space that is the ProcessWire wiki. At the moment, that just means that I have just logged on and am just creating a couple of templates and some other bits and pieces - nothing complicated, I don't have enough time! Once I have done that, I will start scribbling. For the moment, all I have done is a half complete help page about starting a new article (click on help in the left navigation), and created two categories - Drafts and Pending. Hopefully this will help with anything anyone writes which they want to flag up as not finished or need checking. More info on the help page. Talking of categories - if someone has any good ideas about what categories should be created and how they should be organised - that would be really useful! Joss. (PS: If anyone needs a logon for the Wiki, please ask Ryan, not me!)
-
Okay, I really like the Knitted one. I was originally trained as a sound Engineer back in the 70s and the head of Maintenance at the studio used to refer to making the huge looms we used to make (300+ cores) as Knitting with Electric String. Joss
-
Yep, I sort of noticed that! These are only flags really, just template that can be added to articles so that people who are involved know what is what. For instance if you or one of the very experienced users see "This article is awaiting peer review and is not yet adopted as part of the official Documentation" Then you would be tempted to read through it and either think, fine, and change the template on the page, or make some comments in Talk so it can be changed. We can make it less formal: "This article is work in progress" "This article needs checking" "Ryan likes this one!" Might be worth starting a dedicated forum section so that users can post that they have put up a new article and can someone please check it, or whatever. By the way, I cant create or edit in the wiki..... Joss Edit: PS: Can the wiki be changed so that it doesn't have the index.php in the address? Makes it more logical to use. I can't remember how to do it, before you ask!
-
Hi Mindplay With an HTML5/Jquery WYSIWYG editor, I suppose it would not be too hard to replace the normal buttons entirely, and just have exactly what you are suggesting. I suppose you could sort of test your concept with TinyMCE. Remove all the buttons and only have "styleselect" Then create a pile of styles. I know that isn't snippets, but it might give an idea of what it is like to work in that way. Going the JQuery/HTML5 editor route actually kills two birds with one lump of code - it would be nice to see one integrated into PW anyway. One thing about snippets is that I think it is important to see what is happening. So, if for instance a snippet is creating a text block, in the editor, it should show a dotted border (even if the final does not have one), so you can see what the constraints are. Also, everything should be artificially padded so it is easy to select within them. But none of that is difficult - just slight style variations for the editor version of the snippet. Joss
-
Couldn't resist a modicum of silliness:
-
Hi Diogo Er, link seems unusual....
-
I will try later and let you know. I find most editors a pain, to be honest. They all come under a category I call "there has to be a better way to do this"