Leaderboard
Popular Content
Showing content with the highest reputation on 11/11/2014 in all areas
-
Okay, so we all like to think we are super organised when it comes to planning our ProcessWire site, but sometimes life is not like - we are uselessly lazy and can't even make our coffee in the right order (is is add the whisky first or second?). So, here are a couple of really lazy ideas to make everyone feel better about messing up. First Lazy idea Oh, I forgot to create a field! (or two, or three....) On the template edit page where you add the fields, how about a Create New Field button that allows you to create a field and add it to that template. Probably opens a modal window to create the field. Second Lazy Idea OH, why didn't I create the field BEFORE I created all these templates? No Problemo! On the field Info tab where you can see which templates use the field, what about having another box that lists all the templates that do NOT use the field and are displayed in columns with little check boxes next to them - tick the boxes and save to add the field to those templates. Third Lazy idea Adding a group of fields to a group of templates. I have actually just changed this from what I was going to suggest because my original idea was not lazy enough - far too much work for the user. So, you get a new button at the bottom of your list of fields and a check box next to each field. Hit the check box and the button gives you the option to Add fields to Template. A modal opens where you can change the order of the fields and select which templates you want to add them to. In addition, you get the option to add them within a tab set or field set and give that a name. Click Add and all those fields are added to the templates in the order you have set them. (Note, if any of the fields have already been added to any of the templates, then it either does not add those fields and tells you which were not added to which templates, or it fails completely and tells you which were not and so on.) Fourth Lazy Idea Lazy blokes template creation with fields. So, you suddenly realise you need 20 more templates with 18 existing fields each but you haven't got a handy dummy template with the right fields in. Don't panic. On the new template screen, simply select the fields you want, complete with tabs, field sets, and the right order, then choose the templates you want to create as normal and done! Wow, that was lazy! Fifth Lazy Idea I can't remember what I am doing where, why and when! So, this is a new screen under set up called something like Field Matrix. Basically it is a large, scrollable chart that has fields down the Left and templates across the top. From this chart you can now see which fields are being used on which templates shown by ticks and crosses. PLUS! You can actually add and remove fields from templates by clicking on their tick or cross to change it. THIS IS REALLY DANGEROUS (and probably a bad idea) but it is also wonderfully lazy! Doesn't all that laziness feel good? So there you go: Five lazy ideas to help tired, overworked, and disorganised web people get through their day, Joss (I know, far too many changes in one go - but I enjoyed thinking about them!)9 points
-
I think it's just about presentable, so here is, my own blog, http://dpreston.com. It uses Kongondo's excellent blog module (which I butchered somewhat in the process) and a couple of others as noted in this post, and takes advantage of a CloudFlare free account to benefit from spdy and https. Nothing fancy, but I'm reasonably happy with it.7 points
-
Welcome atano! Processwire is great to learn "CMS" so you get some starting points! 1.Overview for the "warmup" https://processwire.com/talk/topic/6731-beginners-guide-to-processwire/ 2.Simple News Sytem threat https://processwire.com/talk/topic/2985-how-to-create-a-simple-news-system-for-pw/ 3.Tutorial Corner http://processwire.com/docs/tutorials/ 4.Go deeper with news https://processwire.com/talk/topic/3782-scalability-of-pw-news-system/ 5.more deeper with lots of articles/cats and so on you may look at the module ListerPro https://processwire.com/talk/store/product/14-listerpro-dev/ (Lists everything with your selections - like all news for a special categorie and much more!) 6.For a real big website have good reading of famous kongondo's article https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ Have fun with PW and here in the forum - be not afraid baby you are at home!7 points
-
Just a simple contact form including spam protection. Optional support for Twig (TemplateTwigReplace) as template engine. --- Please have a look at the readme on github! If you upgrade from version 0.0.9 and below, there are some extra steps to be taken. The Guides Installation Module Settings Spam Protection Usage Logging Upgrade Notes5 points
-
I have been learning and experimenting with Processwire for a few months now. I have about five sites under development and its going pretty well for the most part. I wear several hats professionally. Doing some real estate photography is one of my sideline businesses. Here is my site: http://seattlerealestatephotography.com/ I received a lot of help figuring out foreach statements, some of the PW API, building a gallery system and getting html fragments to behave. I simply could not have done any of this without some really great help from this forum. Thanks! PS: there are still some more refinements I need to finish but most of the site is ready to go (I hope...)4 points
-
I have added the ability to set the assigned datetime manually. This can be done by setting the assigned value to the page you going to add. For example: $friend = $users->get('johndoe'); $friend->assigned = "2012-01-01 12:12:12"; $page->myfriends->add($friend); $page->of(false); $page->save(); When you want to modify the value of an already assigned page you will have to remove it first and then add it again with a new assigned datetime value. $friend = $users->get('johndoe'); $page->myfriends->remove($friend); $page->of(false); $page->save(); $friend->assigned = "2012-01-01 12:12:12"; $page->myfriends->add($friend); $page->of(false); $page->save();4 points
-
Back to OP, I had reservations too when I first started using PW. It was the tree view I was concerned about too. IE I wondered how PW would handle a list of say, 200 sub-pages. Would users have to scroll way down a massive list of posts? Would the back end be slow? Once I started using PW, I realised this was a moot point as PW will paginate your pages within the admin every 50 or so pages. See screengrab of the PW Skyscrapers Demo and notice how the Architects pages are paginated and have very fast next/back arrows there too. PW is incredibly zippy and accessing any page takes no time even when you have to drill down into sections The admin search is very fast so you cna jump right to a page if you know the title or contents PW 2.5 has a Recent Pages link which is very handy Again, there's the Lister Pro module too which is an extra bonus3 points
-
This isn't real? I just had a vision last night (after having a good smoke ), where I was thinking about having a "Page Builder". Create a page, it will create a empty template. Now add or create fields to the page form and configure them on the fly. After some thinking, this would get though, as also now there's a "modal" option for tabs etc. And it may create problems with some fields etc. Throwed this in the backyard quickly. Maybe on template level this might work little better. I'm thinking about having a template/field builder since 3 years now, it works fine in my head.2 points
-
Another processwire relaunch made by neuwaerts: The Website of the Shopping Mall "Galerie Luise" which is located in the center of Hannover, Germany. The mall was recently bought by one of our customers, accom (whose [interims]website is also powered by processwire and launched some weeks ago) and needed some refreshment in terms of design, marketing and strategy. As a result we've created a slightly adjusted logo, a new claim, new print materials and a shiny new websites which mainly features upcoming events held in the galerie luise. http://www.galerie-luise.de/2 points
-
Great answer from ms-fan! I just want add one thing: it won't be quick. Edit: just to be clear, I meant "it won't be quick" in the sense of building it and not the speed of the website.2 points
-
Yup. It was a problem with the apache vhosts :/ You're right. It's hard to read. I'll check if we can adjust the transparency or add some text shadow to make it more readable. Yup: sgh is operating internationally so there will be an english version in the future. Btw: Thanks for all your feedbacks. They're really helpful! Edit: Hey totoff, The "boxiness" is part of their corporate design. I think it's a matter of taste rather than an issue. I personally like it a lot though it has some drawbacks when doing a responsive design (same/fixed height & width boxes are really hard to implement in the way they are used within the site as the content needs to always fit in because you aren't allowed to vertically expand the box). Webdesign as a business is getting harder and harder as you need clients who understand it's not enough (for them) to buy a (mostly awesome looking) wordpress template for 50 bucks. I don't think "Webdesign" is a dying profession but it's shifting from developing "websites" to developing app like information systems that are device and context agnostic. I really like the direction Mozilla is going with it's Firefox OS and it's freshly released developer browser and hope the "web vs. native war" will get more equal as web technologies like webrtc, webaudio, webgl, ecmascript 6[...] evolve and are well supported across all devices. In my opinion it would be a big loss if the openness of the web is interchanged with closed ecosystems like apples or microsofts. But this is propably worth it's own thread2 points
-
1 point
-
This basic tutorial is primarily aimed at those new to PW. It could also serve as a reference to others more seasoned PW users. The question about how to categorise content comes up in the forums now and again. Hopefully with this post we’ll have a reference to guide us right here in the tutorials board. Many times we need to organise our site content into various categories in order to make better sense of the data or to logically and easily access it. So, how do you organise your data when you need to use categories? Here are a few tips gathered from the PW forums on how to go about this. Using these tips will, hopefully, help you avoid repeating yourself in your code and site content and keep things simple. See the links at the end of this post to some useful discussion around the topic of categorisation. Before making decisions about how to organise your site, you need to consider at least three questions: What items on my site are the main items of interest? These could be people or things (cars, plants, etc.). In most cases, these are the most important content on which all the other stuff point to. Where do items need to be grouped into categories? This is about where items need to “live”. It is about the attributes of the items of interest (e.g. responsibilities, job types, colour, etc.). Attributes can have sub-attributes (e.g. a category job type = driver could be further sub-classified as job type role = train driver). Can they live in more than one place? - This is about having multiple attributes. There could be other issues such as the type of content your main items of interest are but that’s for another post. We’ll keep these examples simple. The main principles explained below still apply. There are at least three possible ways in which you can organise your content depending on your answers to the above three questions. These are: Single category Simple multiple categories Complex multiple categories These are illustrated below. Note that this is what I call them; these are not PW terms. 1. Single Category Suppose you need to do a site for a company that’s made up of several Departments each with employees performing unique functions. These could include “Finance”; “Media Communications”; “Administration”; “Technicians”; “Human Resources”; “Logistics”. We ask ourselves the following questions based on our 3 questions above: 1. Q: What items on my site are the main items of interest? A: Employees. 2. Q: What attributes of our items of interests are we interested in? A: Departments. (Single main category) 3. Do the Departments have sub-categories? A: Yes. (Multiple sub-categories) 4.Can Employees belong to multiple sub-categories? A: No. (Single sub-category) We conclude that what we need is a Single Category model. Why? This is because, in Single Categories model, items of interest can only belong to 1 and only 1 main/parent category and within that only 1 sub-category Employees in this company can only belong to one and only one department. Finance guys do their finance and Logistics guys do their stuff. Letting Techies do press conferences is probably not going to work; that we leave to the Media guys . Assuming the company has the following employees - James, John, Mary, Ahmed, Peter, Jason, Barbara etc., arranging our site content to fit this model could look like the following: Items of interest = Employees Categories = Departments Adopting out strategy to keep it simple and logical, let us write down, hierarchically, our employee names against their departments to mimic the PW tree like this: James Finance John Finance Mary Technician Ahmed Logistics Barbara Media Etc. We notice, of course, that departments start repeating. It doesn't look like we are doing this very logically. If we think about this carefully, we will conclude that, naturally, the thing (attribute in this case) that keeps repeating should be the main criteria for our categorisation. This may seem obvious, but it is worth pointing out. Also, remember, that as per the responses to our questions, the categories (Finance, Logistics, etc.) do not have sub-categories. In this aspect, we are OK. Using this principle about repeating attributes, we find that Departments, rather than Employees, need to be the main categories. Hence, we categorise our PW site content by doing the following. Create a template for each Department. Hence, we have a template called Finance, Logistics, etc. Add the fields needed to those templates. This could be a text field for holding Employee phone numbers, email field for email, title field for their names, etc. Create top level pages for each Department and assign to them their respective templates. Give them appropriate titles, e.g., Finance, Media, etc. Create a page for each employee as a child page of the Department which they belong to. Give them appropriate titles, e.g. James, John, etc. We end up with a tree that looks like this: 1. Finance (ex. main category) a. James (ex. item of interest) b. John c. Shah d. Anne 2. Logistics (ex. main category) a. Ahmed b. Matthew c. Robert d. Cynthia 3. Media a. Barbara b. Jason c. Danita 4. Human Resources a. Michael b. Pedro c. Sally 5. Technician a. Mary b. Oswald c. Dmitri d. Osiris Since an employee can only belong to one Department, our work here is done. We can then use PW variables, e.g. $page->find, $pages->find with the appropriate selectors to find employees within a Department. This is a very basic example, of course, but you get the idea. You have the choice of creating one template file for each category template as well. I prefer the method of using one main template file (see this thread). You could do that and have all Departments use different templates but a single template file. In the template file you can include code to pull in, for example, the file “technician.inc” to display the relevant content when pages using the template “Technician” are viewed. Example code to access and show content in Single Categories model $hr = $pages->find("template=human-resources, limit 50"); foreach ($hr as $h) { echo "{$h->title}"; } But sites do not always lend themselves to this model. Many times, items of interest will need to belong to multiple categories. 2. Simple Multiple Categories Let’s say you were building a site for cars - red cars, blue cars, 2-seaters, 5-seaters, etc. Again, we ask ourselves our questions based on our initial three questions: 1. Q: What items on my site are the main items of interest? A: Cars. 2. Q: What attributes of our items of interests are we interested in? A: Colour, Number of seats, Models, Year of manufacture, Types. (Multiple categories) 3. Do these multiple attributes have sub-attributes? A: Yes. e.g., the attribute Colour has several sub-categories - red, white, green, etc. (Multiple sub-categories) 4. Can Cars have multiple sub-attributes? A: No. e.g., a yellow car cannot be a green car. (Single sub-categories) We therefore conclude that what we need is a Simple Multiple Category model. Why? This is because, in Simple Multiple Categories, items of interest can belong to multiple parent categories. However, within those parent categories, they can only belong to one sub-category. Assuming we have the following cars, manufactured between 2005 and 2008, as items of interest: Mercedes, Volvo, Ford, Subaru, Toyota, Nissan, Peugeot, Renault, Mazda, arranging our site content to fit this model could look like the following: Items of interest = Cars Categories = Model, Year, Colour, Number of seats, Type Sub Categories = Model [Prius, etc.]; Year [2005, 2006, 2007, 2008]; Colour [Red, Silver, Black, White, Green]; Number of seats [2, 5, 7]; Types [sports, SUV, MPV]. Adopting out strategy to keep it simple and logical, if we wrote down our cars names against their attributes like this: Mercedes Model-Name: Year: 2005 Colour: Silver Seats: 2-seater Type: Sports Volvo Model-Name: Year: 2007 Colour: Green Seats: 5-seater Type: SUV Ford Model-Name: Year: 2007 Colour: Red Seats: 7-seater Type: MPV Etc We notice, again, that car attributes start repeating. In order not to repeat ourselves, we want to avoid the situation where our child pages “names” keep repeating. For instance, in the above example tree, we want to avoid repeating year, colour, etc. within the tree. Of course in the frontend our output needs to look like the above where we can list our cars and their respective attributes. We just don’t need a tree that looks like this in the backend. Since we have multiple categories and sub-categories, we need to rethink our strategy for categorising our content as illustrated below. The strategy we used in the first category model will not work well here. Hence, these repeating attributes (year, colour, etc.) need to be the main criteria for our categorisation. We need to end up with a tree that looks like this: 1. Cars a. Mercedes (ex. item of interest) b. Volvo c. Ford d. Subaru e. Toyota f. Range Rover g. Peugeot h. Renault i. Mazda 2. Model (ex. main category) a. Fiesta (ex. sub-category) b. Miata c. Impreza d. Matrix e. Prius f. E-Class g. XC-90 h. Scenic i. L322 j. 505 3. Year a. 2005 b. 2006 c. 2007 (ex. sub-category) d. 2008 4. Colour a. Red b. Silver c. Black d. White e. Green 5. Number of Seats a. 2 b. 5 c. 7 6. Type a. MPV b. Sports c. SUV d. Other At the top of the tree, we have our main items of interest, Cars. They do not have to come first on top of the tree like that but it just makes sense to have them like this. Next, we have the Cars’ categories (attributes). The main categories are parent pages. Each main category has children which act as its sub-categories (cars’ sub-attributes). For instance, the main category colour has sub-categories “red”, “green”, etc. Grouping them under their main category like this makes better sense than having them dangling all over the tree as parent pages themselves. Now that we know what we want to achieve, the next question is how do we go about relating our categories and sub-categories to our main items of interest, i.e., cars? Fields come to mind. OK, yes, but what about the sub-categories (2006, red, 5-seater, etc.)? Surely, we can’t keep typing those in text fields! Of course not; this is PW. We like to simplify tasks as much as we can. What we need is a special type of field. Page Reference Fields or Page Fieldtypes add the ability to reference other pages, either single or multiple pages, within a page. For instance, we could have a Page Reference Field in the template that our Car pages use. Let’s call this “car-template”. When viewing Car pages, we would have the ability to select other pages on our site that we wish to reference, for instance, because they are related to the page we are viewing. In other cases, we could also wish to reference other pages that contain attributes/values of the page we are viewing. This is the situation with our Cars example above. Hence, the sub-categories/sub-attributes for our Cars will be pulled into our car pages using Page Reference Fields. There are two types of Page Reference Fields; single page and multiple pages. What each do is obvious from their names. Single Page Reference Fields will only reference one page at a time. Multiple Page Reference Fields will reference multiple pages. OK, let’s go back to the issue at hand. We need to categorise Cars by various attributes. Do we need to reference the main categories (Year, Type, etc.) in our Car pages? In fact, we don’t. What we need to reference are the sub-categories, i.e. 2005, red, SUV, etc. These will provide the actual attributes regarding the parent attribute of the Cars. We have said we do not wish to type these sub-categories/attributes all the time hence we use Page Reference Fields. Which type of Page Reference Field should we use? Remember that our Cars can have only one sub-category/sub-attribute. That’s our cue right there. In order to select one and only one sub-attribute per Car, we need to use the single Page Reference Field. Hence, we categorise our Cars PW site by doing the following (you may follow a different order of tasks if you wish). Create a template to be used by the Car pages. Give it a name such as car-template Create a page for each of your cars and make them use the car-template Create one template to be used by all the main attribute/categories and their children (the sub-categories). We do not need a template for each of the categories/sub-categories. I name my template “car-attributes” Of course you can name yours differently if you wish. Add the fields needed to this template. You don’t need anything other than a title field for each actually. Create top level pages for each main category and assign to them the template car-attributes. As before, give your pages meaningful titles. Do the same respectively for their child pages. E.g., you should have the following child pages under the parent “Year” - 2005, 2006, 2007 and 2008. Create the Page Reference Fields for each of your main categories/parent attributes. Using our example, you should end up with 5 Page Reference Fields (model, year, colour, seats and type). Each of these should be single Page Reference Fields. It’s a good idea, under the BASICS settings while editing the fields, to include some Description text to, include additional info about the field, e.g. instructions. In addition, you don’t want any page that doesn't belong to a particular attribute to be selectable using any of the Page Reference Fields. For instance, when referencing the year a car was manufactured, we want to be able to only select children of the page Year since that is where the year sub-categories are. We do not want to be able to select children of Colour (red, green, etc.) as the year a car was manufactured! How do we go about this? PW makes this very easy. Once you have created your Page Reference Fields, while still in the editing field mode, look under the settings INPUT. The fourth option down that page is “Selectable Pages”. Its first child option is “Parent of selectable page(s)”. Where it says “Select the parent of the pages that are selectable” click on change to change the parent. By now you know where I am going with this. For the Page Reference Field named Year, choose the page “Year” as the parent whose children will be selectable when using that Page Reference Field to select pages. Similarly, do this for the remaining 4 Page Reference Fields. Note that under this field settings INPUT you can change how you want your pages to be selectable. Be careful that you only select the types that match single Page Reference Fields, i.e. the ones WITHOUT *. For single Page Reference Fields, you have the choices:Select - a drop down select Radio buttons PageListSelect Now edit the car-template to add all 5 of your Car Page Reference Fields. We are now ready to roll. Go ahead and edit your Car pages. In each of them you will see your 5 Page Reference Fields. If you followed the instructions correctly, each of them should only have the relevant child pages/sub-attributes as selectable. Do your edits - select year when car was manufactured, its colour, type, number of seats, etc. and hit Save. By the way, note that Page Reference Fields give you access to all the fields and properties of the page being referenced! You have access to the referenced page’s title, name, path, children, template name, page reference fields, etc. This is really useful when creating complex sites. I call it going down the rabbit hole! These properties of the referenced page are available to you on request. It does mean that you will have to specifically echo out the property you want from that page. Page Reference Fields are echoed out like any other field. Example code to access and show content in Simple Multiple Categories model $cars = $pages->find("template=car-template, limit=10, colour=red, year=2006, seats=5"); foreach ($cars as $car) { echo $car->title; echo $car->year; echo $car->colour; } I have made the above verbose so you can easily follow what I'm trying to achieve. The above code will find 10 red 5-seater cars manufactured in 2006. Remember, colour, year and seats are the names of your custom Page Reference Fields that you created earlier. Some sites will have content that belong to multiple categories and multiple sub-categories. We address this below. 3. Complex Multiple Categories Suppose you are developing a site for a school. The school has teachers (duh!) some of whom teach more than one subject. Besides their classroom duties, some teachers are active in various clubs. On the administration side, some teachers are involved in various committees. You know the drill by now. Let’s deal with our basic questions. 1. Q: What items on my site are the main items of interest? A: Teachers. 2. Q: What attributes of our items of interest are we interested in? A: Subjects, Administration, Clubs (Multiple categories) 3. Do these multiple attributes have sub-attributes? A: Yes. e.g., the attribute Subjects has several sub-categories - History, Maths, Chemistry, Physics, Geography, English, etc. (Multiple sub-categories) 4. Can Teachers have multiple sub-attributes? A: Yes. e.g., a Teacher who teaches both maths and chemistry (Multiple sub-categories) Apart from the response to the final question, the other responses are identical to our previous model, i.e. the Simple Multiple Categories. We already know how to deal with multiple categories so we’ll skip some of the steps we followed in the previous example. Since our items of interest (Teachers) can belong to more than one sub-category, we conclude that what we need is a Complex Multiple Category model. In Complex Multiple Categories, items of interest can belong to multiple parent categories and multiple sub-categories both within and without main/parent categories. By now we should know what will be the main criteria for our categorisation. We need to end up with a tree that looks like this: 1. Teachers a. Mr Smith (ex. item of interest) b. Mrs Wesley c. Ms Rodriguez d. Mr Peres e. Mr Jane f. Mrs Potter g. Ms Graham h. Mrs Basket i. Dr Cooper 2. Subjects (ex. main category) a. History (ex. sub-category) b. Maths c. English d. Physics e. Chemistry f. Geography g. Religion h. Biology i. French j. Music 3. Clubs a. Basketball b. Debate c. Football d. Scouts e. Sailing f. Writing 4. Administration a. Discipline b. Counselling c. Exams board d. Public relations e. Education We are ready to build our site. Which type of Page Reference Field should we use? Remember that our Teachers can teach more than one subject and can be involved in various sub-category activities. That’s our cue right there. In order to select multiple attributes/categories, we of course go for the multiple Page Reference Field. Similar to the previous example, create necessary templates and fields for the site. For our multiple Page Reference Fields, remember to select the correct input field types. These should match multiple Page Reference Fields and are marked with *. For multiple Page Reference Fields, the available choices are: Select Multiple* AsmSelect* Checkboxes* PageListSelectMultiple* PageAutoComplete* Remember to add the multiple Page Reference Fields to the Teachers template. Go ahead and test different selectors, e.g. find Teachers that teach Maths and Chemistry and are involved in the Writing club. Whether you get results or not depends on whether there is actually that combination. An important point to remember is that your multiple Page Reference Fields will return an array of pages. You will need to traverse them using foreach (or similar). Example code Complex Multiple Categories model Find the subjects taught by the Teacher whose page we are currently viewing. You can use if statements to only show results if a result is found. In this case, of course we expect a result to be found; if a Teacher doesn't teach any subject, he/she has no business teaching! subjects is the name of one of your custom Multiple Page Reference Fields. echo "<ul>"; foreach ($page->subjects as $x) { echo "<li>{$x->title}</li>"; } echo "</ul>"; There will be situations where you will need to use both Single and Multiple Page Reference Fields (independently, of course). For instance, in our Teachers example, we might be interested in the Gender of the Teacher. That would require a Single Page Reference Field. Summary What we have learnt: Categorising our site content need not be a nightmare if we carefully think it through. Of course not all sites will fit neatly into the 3 models discussed. By providing answers to a few simple key questions, we will be able to quickly arrive at a decision on how to categorise our content. There are at least 3 models we can adopt to categorise our content - single category; simple multiple category; and complex multiple category. In the latter two models, we make full use of PW’s powerful Page Reference Fields to mimic a relational database enabling us to roll out complex sites fast and easy. Useful links: http://processwire.com/talk/topic/3553-handling-categories-on-a-product-catalogue/ http://processwire.com/videos/create-new-page-references/ http://processwire.com/videos/page-fieldtype/ http://processwire.com/talk/topic/1041-raydale-multimedia-a-case-study/ http://processwire.com/talk/topic/683-page-content-within-another-page/ http://processwire.com/talk/topic/2780-displaying-products-category-wise/ http://processwire.com/talk/topic/1916-another-categories-question/ http://processwire.com/talk/topic/2802-how-would-you-build-a-daily-newspaper/ http://processwire.com/talk/topic/2519-nested-categories/ http://processwire.com/talk/topic/71-categorizingtagging-content/ http://processwire.com/talk/topic/2309-best-way-to-organize-categories-in-this-case/ http://processwire.com/talk/topic/2200-related-pages/ http://processwire.com/talk/topic/64-how-do-you-call-data-from-a-page-or-pages-into-another-page/1 point
-
Adds twig support for language translator list. To get your `.twig` files listed as well, you need to wrap the phrases like this: {{ __('text to translate', 'filepath/filename relative to site/templates/') }} {{ __('another text to translate', 'home') }} {{ __('one more text to translate', 'partials/header') }} first line - general usage second line - example for a text in site/templates/home.twig third line - example tor a text in site/templates/partials/header.twig1 point
-
I like your fifth idea, the "Field Matrix". This is similar to a concept I've played with in my mind at the planning stages of a ProcessWire site, to work out what's needed and where. I've never managed to do it in practice, though, because I tend to just simply have a nested bulleted list of the templates and fields instead (which ends up with a lot of repetition and nowhere near as visually comprehensive as a matrix!) Additionally... while we're here... Duplicate/clone this field/template I feel like this section could do with two lazy-related additions to save clicks: a text box to enter the new name an option to go and edit the new field/template immediately1 point
-
Hmmm...that is strange...Hard to tell what it is since I have just tested the install and it works just fine. I think these resulted from the first error (5.1) and the installer didn't finish. Can you please use Blog 'Cleanup' to uninstall all the Blog components (leaving only the module) and start again from your step #3? If that doesn't resolve the issue, completely uninstall the module and start afresh.1 point
-
Atano, I can't see your image clearly nor able to download it. I can't read the error messages on the Tags, Categories and Comments visibility. However, the error 'maximum function nesting level of 100 reached' is a well known xdebug issue. Here's how to solve it. That will probably sort out your other issues as well. Some module developers haven't yet updated their modules' PW version compatibility list. SchedulePages will work just fine in 2.5. Did you try it?1 point
-
Yes - you have import for both fields and tables as part of the core and there is also a module that does a combination. Actually, I need to find that - I need it for something Edit: this was it https://processwire.com/talk/topic/4420-migrator/ Still a bit experimental I believe1 point
-
1 point
-
This is done when you have a template with family setting to have allowed children template. On the children template select the parent template to allow, there will appear a setting to turn off or on if it should add it to the "Add New" button.1 point
-
PageArray->prepend($item) originally was only for one item and import() was only for adding PageArray. This was added to support arrays for all add() prepend() append() etc. Looks like the prepend() has a bug where it counts ++ when prepending multiple items. It works correct if using append() or add(). If you use foreach to add via prepend(item) it works also correct. Maybe file an issue?1 point
-
Hi Mike, Your form has good questions and a reasonable number of them. I have a few random observations, though: I don't know about the table border and the lack of clear textbox outlines. The table borders make it feel more like a paper form; that, along with the font, gives it a more conservative look than I'd expect from a design firm. The lack of outlines make it harder to recognize as a web form; I didn't instinctively know where to type. You may want to at least consider shading the text fields. The all-caps text makes the long labels harder to read. You're assuming that the person contacting you has or represents a business. The phrasing of some of the optional answers might overwhelm the technically-inexperienced inquirers, such as the web address question, and the tone used through the form varies substantially. Some of the phrases seem informal ("As soon as humanly possible", "Yes!"), but this doesn't match the look of the form. When the submitter chooses "Other", a focused textarea should appear below the radiobutton. You might want to consider adding an Other option to more of your questions. Anyway, feel free to take my suggestions, but it looks good as it is.1 point
-
@Atano, Welcome to PW and the forums. Thanks to trying out Blog.. 1. I am not sure what is happening in your case. How are you creating a new post, using the Quick Post or as a normal PW page (i.e. via the pages tree)? 2. SchedulePages works fine in PW 2.5.2 3. No; there is no support for sub-categories 4. Have a read here for PW caching options to assess what suits your needs best: http://www.flamingruby.com/blog/processwire-caching-explained/1 point
-
quick is relative.... if you look at other cms with processwire you get very quick to the needed result. it depends very much of the "level" of atano with PHP, HTML and JS and what the website should be. oh i forgot two very important links for news/article systems!!! 7. Take a look at ryans blog profile (a buch of useful templates that build a blog) http://modules.processwire.com/modules/blog-profile/ 8. And there is a real real big and great blog module from kongondo! (May this take you a big and quick step in the right direction?) http://modules.processwire.com/modules/process-blog/ for a blog special the last link with the module would be a big thing to try and use... regards mr-fan1 point
-
Thank you for your wonderful module, kondongo! 1) I put the module with the test content and for some reason when creating a new post, I can't choose a category(although one test category). Can I do something installed? 2) The user manual says that you need to put ShedulePages, but ShedulePages not supported PW 2.5.2. What to do if I 2.5.2? 3) You can make a sub-categories in a module? 4) And what caching would you recommend for the blog. Procache fit?1 point
-
@kixe I always wanted to take a look at the actual code, but I just did not know where to look. Thanks a lot for pointing me into the right direction! Cheers, Stefan1 point
-
1 point
-
1 point
-
1 point
-
Hi Felix, very nice site, though - as a designer - I'm a bit unsure about the very strong "boxiness" of the design. Do you know what I like about your postings apart from showcasing great sites? They give proof that webdesign as a business isn't dead! Good work!1 point
-
Thank you! I'll ask the next customer if we can do an ugly site for them. I'm sure they gonna agree. Will keep you updated!1 point
-
No. If you really want to use this textfield approach, use muzzer’s technique and make sure every area is wrapped in pipe symbols, so you can select areas %= '|$area|'. However you should be aware that that’s not a good idea at all. If it’s at all possible to use pagefields, as LostKobrakai suggested, you should do that. Once you have set up your areas as pages, it will make everything much easier.1 point
-
Hello bowenac and welcome to the forum! The standard editor is CKEditor which is widely used on the net and has many configuration options. There is an extesive thread about it: https://processwire.com/talk/topic/3023-module-ckeditor/ If you don't like it, you can also go and install TinyMCE or the very lightweight Trumbowyg. When I did my first site with PW, it was quite challenging. But it was well worth to spend the time learning it. I wouldn't want to miss it and develop all new sites with PW now. You find tons of help and info in this board, in the docs section and the API Cheat Sheet can be particularly helpful. It is also useful to take a look at the different site profiles that come with PW 2.5. You can learn a lot about how things are working. Have fun with PW!1 point
-
Felix I really like this one. It's clean, yet vibrant, and then so easy to use. Great stuff!1 point
-
Hehe, indeed - it is working now. I have a small critique about the boxes on the home page, specifically the ones at the bottom left of the image. I think it's because of the font width that the text is slightly hard to read over the darker portion of the image. Obviously, it is readable, but there's a small amount of strain there. I also see that there's what appears to be a language switcher at the top right. Will there be any new languages in the future?1 point
-
@Mary...With the current module you can't...but...with the following simple change, you can . Of course, you can always just request Ryan to make this configurable (i.e. whether to completely hide the field or just lock it down, etc)...Meanwhile.... 1. Create a custom copy of the module 2. Rename the module file from PageEditFieldPermission.module to say PageEditFieldPermissionCustom.module 3. Rename the module class similar to #2 plus change all instances of PageEditFieldPermission (whole word) in the module code to PageEditFieldPermissionCustom 4. Change line #91 in your PageEditFieldPermissionCustom as shown below (see inputfield collapsed setting constants here) //if($field) $field->parent->remove($field);//comment this out if($field) $field->collapsed = Inputfield::collapsedNoLocked;//add this line Haven't thoroughly tested...1 point
-
I've used this type of method for various things in the past, perhaps not on PW, but the way I've done it is to surround the entire string with the "\" character, eg |2|13| This way I believe you can use the %=|3| selector to find only the 3 edit: and you could also use %=|3 to find 31, 310, 35 etc1 point
-
Bravo Maxwell! I remember how I felt getting my first PW site out the door. It was a combination of relief and achievement.1 point
-
Hi Felix I get fed up of liking your showcase posts - you keep doing really nice websites! Can you do a terrible one so I don't feel forced to like it?1 point
-
I’m on my phone and it looks fantastic, but if you could somehow make it so the Safari interface expands when scrolling back up, as it does on most websites, iPhone users will surely appreciate it. Then again, I’m still on iOS 7, so maybe that isn’t an issue anymore with newer Safaris.1 point
-
I suspect that the permission returns an object (NullPage). So your if statement will be: I guess that if you append ->id to your if statement, the outcome will be the integer 0 and thus false. if($this->permissions->get('new-permission')->id) { // higher then 0, the permission (Page) does exists. } else { // 0 If not exists, the ID comes from the NullPage } ps, I didn't checked what I typed here (not on my working machine right now)1 point
-
ProcessWire Forum Rules Version 1.1. Last updated November 10, 2014 Purpose of the Forums The ProcessWire forums are a self-help support forum where users can also contribute towards the future of ProcessWire. It is comprised of individuals from across the globe who want to help each other and who are giving much of their free time to do so. Many members have commented that the ProcessWire forums are exceptional in how equally friendly and hospitable they are to those who are very knowledgeable and those who are only just beginning to learn. A word about the rules The rules are here for the benefit of everyone. It says something about a community that we have not required any for four years despite the occasional heated debate. However, as the community has grown it seems only fair to create rules for both members and staff alike. Rules are not the same as laws. They are applied to each individual situation as the need arises and can be interpreted by the staff after reaching a consensus, where appropriate, or they may be enforced quicker in the case of situations requiring immediate attention or that are in very clear violation of the rules. Please respect the outcome of any decisions made by the staff. Rules for posting No Flaming. Never threaten the project, developers or other forum members. Threatening behaviour will be dealt with swiftly by staff and may result in a ban.. No Spamming. Spamming violations may result in your post count being reset, revocation of posting privileges, or even permanent banning from the site. There are several types of spam: Off-Topic posts outside the off topic “Pub” forum. If you wish to make an off topic post, please do this in the “Pub” forum. Multiposting. Multiposting is repeating the same message several times in the same topic, or, making a post directly after another, when you could have edited the additional comments into your first post. Multithreading. Multithreading is posting the same message in several different threads. If you do not receive a reply to your post, it may be that people do not have an opinion or are simply not online. Be patient. Unauthorized Advertising. Any unauthorized advertisements will be deleted and the offending member may be banned. Please note that linking to your company website is permitted in your signature as a plain text link. No discussion of politics or religion anywhere on these forums including the Off Topic boards - there are many other websites where you may discuss these topics. Please avoid very bad language. This is not an adult only forum so treat it as being family friendly. Please respect others’ opinions. Do not state that they are wrong and dismiss them in a derogatory manner. Please try and offer constructive counter-arguments when joining a topic containing a debate. If in doubt, don’t post. Please don't tell other people to go and search if they ask a question that has been asked before. If you like, inform a member of staff or a moderator via the reporting feature and we will do our best to merge it into a relevant topic, or you could suggest in a polite manner so as not to offend that they Google the forums via this link - just remember to be friendly as a link on its own can be mistaken for frustration or impatience. Please do not make demands of the developers of this project or of those who manage the forums. It is disrespectful to the people who give so much of their free time to this community Please contact us if you have an issue with another member or even a staff member - the relevant points of contact are at the bottom of this post Please respect the privacy of others. If a member chooses to use a pseudonym rather than their real name, that is their privilege. Please respect their wishes and do not out them even if their real name is common knowledge. Keep to one identity. Do not create alternate avatars and just stick to the one. If there are technical reasons why you need a new one (can’t rescue the old one, perhaps) be open about it. If you are angry about something, step back, take a breather and try to post a reasonable reply. If you feel that someone is being wholly unreasonable or stubborn, please contact a member of staff. Please try and use Common Sense. No set of rules can cover everything. If you think about what you are posting before posting, you shouldn’t run into any trouble. Remember, this is a forum about a software project, not world peace. It is doubtful ANY argument is important enough to be angry about. Please note that these rules may be updated from time to time. If you continue to use these forums it is assumed that you agree to them. Rules for using the Personal Message system The boards have a simple and unrestricted personal messenger - please use this responsibly. In addition to the above rules regarding posting: Please do not use the personal messenger to threaten anyone, tell them off or send a message that is likely to upset or offend. Please respect every member’s privacy and only PM someone if you feel they will be happy to receive a message from you. If you receive any messages that you feel are inappropriate, please contact a member of staff rather than taking matters into your own hands. Please do not copy and paste private messages into the public forums without the consent of the sendee. Actions we might take At the sole discretion of the forum staff and/or administrators, you may be given a warning if you break the rules. If the infraction is deemed severe enough, you will be banned. If you repeatedly break the rules or are belligerent in your response to staff/admin messages about an infraction then you will also be banned. If we do contact you it will be via the personal messenger system on the forums or, in the event of a ban, we will contact you via your registration email. We will not conduct conversations in public nor will we reply to any public conversations about a particular case. Points of contact If you have an issue that requires staff attention, in the first instance you should report the content using the “Report” link at the bottom-right corner of the relevant post. If you wish to, please contact a particular member of staff directly about an issue. If your issue is about a particular member of staff, please contact Pete and/or ryan via Personal Message. Please don't be put off by these rules. They are in place to help make sure that the site keeps its nice and friendly atmosphere. We're not here to rule with an iron fist - we’re here to discuss ideas and help one another, but we will act when people disregard the rules or ruin the atmosphere.1 point
-
Posting Guidelines In addition to the rules, it is recommended that you read the following guidelines to get the most out of your interactions with this community. Interpreting other members’ posts Our community is a global community and as such posts and intentions can be misunderstood. If you encounter a reply that seems “short” and contains links to other topics that may answer your question, this may be due to the large number of members who use the forums on their mobile devices and want to help but don’t have time for a more complete reply or for whom English is not their first language. Please try and give people the benefit of the doubt when posting. Please do not dismiss their views out of hand (constructive replies are welcome). The forum language is English. We really appreciate the effort everyone makes from countries around the world to post in English. After careful consideration and experience on other forums, it makes sense to have one common language for discussion here so that ideas can be shared and not missed in language-specific forums - the same applies for debates that might get out of hand as we do not want to miss those either. There are more and more country-specific ProcessWire websites cropping up however so if you find that a group of you are in agreement and wish to set up a language-specific forum of your own then please feel free. Suggesting new modules/features Many of the features of ProcessWire have been born out of suggestions by users or discussions within the community, but that does not mean that every suggestion can be taken on board or that it might even be in tune with the overall strategy for the project. If you have suggestions for new features or modules, please feel free to propose them in a simple, open way in the Wishlist & Roadmap forum, but don’t be upset if no one is interested. Developer’s needs vary greatly. Your suggestion might well be something that is better developed as a third party module; in fact that is often the case. You are free to develop that yourself or work with others on a project, or even post a job to get help in the jobs board. However, whatever your idea or wish for a new feature, please do not make your suggestion sound like a demand, or tell the developers they have “got it all wrong,” or that you know what is best for ProcessWire. That is simply unfair to those who have been working on the project for free for years. Answering topics If you can help your fellow members then that’s great! Giving something back to the community in a constructive manner is always welcome. If someone replies in a topic you started and you think it is the best answer then please click the “Mark Solved” button at the bottom-right of the relevant post. Staff may mark a post as the best answer for you or change the chosen answer at their discretion if there is a better/more comprehensive answer later on in that topic. Some of the most prolific posters in the community do not count themselves at experts, but are very good at pointing new members in the right direction - you don’t have to be an expert in order to help out. Please don’t tell someone off for asking a silly question - there is no such thing! Every question is being asked because the person genuinely does not know the answer and might not know where to look. Raising issues or disagreements Nobody frequenting this forum should feel threatened when voicing their opinion as long as they are doing so constructively. Please be mindful however that everyone is unique and may interpret situations differently which could lead to misunderstandings. If you find that you disagree with someone, they may simply have a different point of view - this does not automatically mean that their view is wrong or your view is right. If multiple people disagree with you, it could be that a point has been raised many times before and/or that your point is not clear. Please seek clarification and remain calm or go talk about something else. If someone appears to be being simply argumentative, repetitive or belligerent in their replies then please do contact a member of staff and refrain from being drawn into the discussion further. To repeat, we are not solving world issues here, nothing is really so important that you HAVE to say something. If in doubt, say nothing and read another topic.1 point
-
And too bad about WordPress if that's what they are using. I don't think they even know about PW. I will have to have a talk with them sometime.1 point
-
Ask a non-techie if they want to see how you monitor your crontabs and I'm guessing you'll get the same reaction to asking them if they want to know more about the invitation to "fork me on github". They both sound scary. But I finally 'got' why this service https://deadmanssnitch.com/faq exists after setting up a crontab. Anyway, I've no affiliation with these guys but they seem very friendly and if you're into proactive monitoring then it might be something you want now or later, so I thought I'd post. Enjoy1 point
-
Horst, first, and not connected, THANK YOU for your SMTP module. I am loving the much improved way mail is delivered over SMTP versus PHP Mail function. 1. I think the idea is that you see no email, all is silent—unless your cron fails. Only if it fails will you get an email (what you want). 2. Hehe Though serious point is just that without Snitch if cron works then all good, no emails, if it fails then you don't know. With Snitch if cron works then all good, no emails, if it fails then, unless Snitch has also failed, you get an email I am sure clever people can add their own scripts for monitoring, but DMS seems great for lots of cases, not least of which people like me who are not very clever at server scripts1 point
-
Thanks again! I just spent some time revisiting this a bit. It's a bit more complicated that just removing trailing, commas, spaces, tabs etc because it is possible that these might be intentional if someone wants an empty value for the last field on the row. I have implemented a bunch of extra checks to make sure fields/pages etc can't be created without a name, so you shouldn't ever get the unnamed field issue anymore. I have also tried to make sure that the first row has no leading or trailing misc stuff so that the fields get properly created. But with the subsequent rows I allow trailing commas with nothing afterwards in case it is meant to be blank. I just tested with this mess and it looks to be fine: , ,Title, Number of Beds>Integer, Number of People>Integer, Kitchen Facilities>Text ,Single, 1, 1, Fridge Only, Double, 2, 2, Fridge Only Suite, 3, 6, Full Kitchen , Would you mind trying again at your end to see if I have still missed something? Thanks Adrian1 point
-
Blog version 2 Introducing Blog version 2! There are lots of changes so this will be a long read. For upgrading from version 1 to this version, please read the next post. I’ll appreciate beta testers. As you’ll see below, there’s lots of new things (and combination of things!) to test. Many thanks! TL:DR: Blog version 2 is available for beta testing. It comes with a two-step installer that allows you to structure where your Blog lives in your page tree just the way you want and cleans-up after itself in case it isn’t your cup of tea. Please see next post about updating version 1 to 2. Main Changes 1. Configurable Blog 2 is a now configurable module (i.e. ProcessBlog). On a fresh install, you will first have to set a couple of settings before you can run the module. More on this below. 2. Installer Blog 2 comes with a two-step installer. No more installing things you don’t want. In the first step, you set the module configurations in the module settings page as mentioned in #1. The configurable settings are outlined later below. In the second step, via the Blog dashboard, you will see an overview of the settings you selected in the first step above. Here you finalise Blog’s installation. Before you click the button to run the install wizard, nothing will happen yet. You can still go back and change the module configuration settings. Until you run the install wizard in this second step, you will have no Blog pages, fields, templates, etc. On this page, you will also be able to rename your Blog’s main pages before they are created. Yes! If you don’t do it at this stage, you can also rename them post-install in the ProcessWire tree! If you are happy with your settings, click the install wizard to proceed. Blog will be fully installed with your settings before you can dash out to make a coffee . You will then see the familiar Blog dashboard Please note: If you need to change some configurations, you can go back to the module settings and do it BEFORE you finalise step two of the installation. It is important that once the installation is finalised, in case you had left the ProcessBlog's module configuration's browser window open, NOT to press submit again. Otherwise, MarkupBlog may not like it . However, if you reload the module configurations screen once the second-part of the installer has finished, you will not be able to change the configuration settings. Instead, you will be presented with an overview of your installed settings. 3. Blog styles Blog now allows you to install your Blog pages from a choice of 4 different URL structures, aka Blog styles! These should cover most (all?) needs. This means that your Blog pages will live exactly where you want them in the tree, hence give you the URL you want. You select the style you want in ProcessBlog’s module configuration screen (first step of the installer). A visual of the 4 styles is presented on that screen. Example paths for the 4 styles are: Blog style 1: /mysite/blog/posts/example-post/ (similar to Blog version 1) Blog style 2: /mysite/blog/example-post/ (as requested by FuturShoc) Blog style 3: /mysite/posts/example-post/ (same as Ryan’s Blog profile) Blog style 4: /mysite/example-post/ (as requested by PWired) 4. Commenting feature In the first step of the installer (module's configuration's screen), you can choose to install commenting feature or not. The default is to install commenting feature. If you elect not to install this feature, Blog will not install any comments-related components – so no comment fields, associated pages, templates and template files! Note, you CANNOT add this setting once Blog install has been finalised. 5. Auto-publish/unpublish This much requested feature has now arrived! You choose whether to install this feature or not via ProcessBlog’s module configuration screen. The default is auto-publish/unpublish is not enabled. If you want to use this feature, you will FIRST have to install the great SchedulePages module. If you have the module installed, this will be specified in Blog’s module configuration screen. Again you will not be able to proceed with installing this feature unless SchedulePages is installed. If you install this feature, you will see two date fields when editing a blog post, i.e. ‘Auto-publish from’ and ‘Auto-unpublish on’. You will also see these two date fields in Blog’s Quick post’s dashboard. Note, you CANNOT add this setting once Blog install has been finalised. 6. Templates Blog will install templates according to the Blog style you have selected. So, if you went with style #4, you will not have a template called ‘blog’ nor one called ‘blog-posts’. 7. Template files In the first step of the installer (module configurations screen – I know, I am repeating myself!), you have three options when it comes to template files when installing Blog. The default is to install blank template files (with nothing but php tags – a little something to help you get started quickly). The second option is to install demo blog template files (more on this later) and the third is not to install any template files. 8. Demo template files These files have now been streamlined. No more verbose code! A blog-main.inc contains most of the markup and the other template files contain most of the code. The demo will work with any of the 4 Blog styles. 9. Cleanup One of the annoying things with Blog version 1 was not only that it installed things you probably did not need, it also left behind, uh, leftovers (templates, role, pages, fields, template files). Well, no more! Uninstalling Blog is now a two-step process. If you are logged in as a superuser, you will see a Blog menu item called ‘Cleanup’. It will lead to a screen with info about all the fields, templates, pages and role you are about to delete. It will also list the Blog template files that, if you wish, you can also delete. This utility is also useful when you want to try out the different Blog styles without uninstalling the whole Blog module. It returns Blog to the state similar to when you first installed the module. Of course, in case you want to remove Blog as well, just go ahead and uninstall in the normal way but AFTER you have cleaned-up . 10. Renaming Blog pages As mentioned previously, you can rename any of your Blog pages pre- or post-install. Want Diary or Journal instead of Blog? Sure, go ahead. Want Writers instead of Authors? What about Chronicles in lieu of Archives? You can have those too. The only things you should NOT do are to delete the main Blog pages (i.e. anything other than Example Tag, Example Category and Example Post) OR (however remote the chance of this is) CHANGE the IDs of these pages (in the database). In order to allow for flexibility, Blog stores and tracks its main pages using their IDs. 11. Fields and templates admin tag In step 1 of the installer you can choose to change the default name of the tag used to group Blog fields and templates in the admin. You can as well choose not to have any tag and let anarchy reign in your admin pages! 12. Context aware Most of the Blog dashboard is now context aware. It will only display info about Blog components that are installed. No comments? Fine, no comments in Posts dashboard, etc. Apart from ‘Posts’ dashboard, the other Blog dashboards will be labelled according to the titles of your main Blog pages. For instance, if you called ‘Categories’ ‘Classifications’, that is the name you will see in the ‘Categories’ dashboard label. Same for Authors, Tags, etc. Even Cleanup is context aware and will only list components related to the Blog style you installed. OK, so how do I get Blog 2? You can install via ProcessWire modules screen. get it on the dev branch of Blog in GitHub. It is also attached below (please use Github - it is the latest version). I thoroughly tested this but I probably missed something or mixed up my code somewhere so there could be bugs . Please help me find and swat them, thanks! Next post, updating Blog 1 to 2.1 point
-
I think more direct workflow would be from template - possibility to create a new field and attach it directly to a template. I mean you pretty much always want to order the field, so you need to be on template view anyways.1 point