tuxy Posted February 11, 2015 Share Posted February 11, 2015 Hello, I will redesign an old project, event site, http://www.market-locator.com/ , this site is made in Drupal. This site is a portal site with all the weekly markets in Belgium. For the moment this site is outdated Now I have new motivation with this new CMS and will try this site alive and updated in PW. The site has a contenttype market , and this are the fields: - City (textfield) - Market (select/taxonomy) weekly, brocante, car, animal, ... - Dates (module with option for repeatly weekly/mothly) - Adress/Location (with lat/lon) - Province (select/taxonomy) - Notes (textfield) - Voting - ... I think for a good experience searching markets with a combination of 2 field-elements: - Date-field (populate with the jQuery datapicker) - Province (Dropdown/select) (Like this for example: http://www.market-locator.com/marktkalender?province=1 ) The sort of url segments in Drupal is now: ../province/Market/City ex: http://www.market-locator.com/markten/west-vlaanderen/weekmarkt/nieuwpoort I think this URL is the most logical solution ? Or not? (After the remake i will the site expandable with a registration form for market-vendors and give the vendors one page for advertising, but that is for the future) What is the best (future-proof) solution for remake this in PW? Christophe Link to comment Share on other sites More sharing options...
diogo Posted February 12, 2015 Share Posted February 12, 2015 Hi there, very nice project Before doing anything, read this tutorial about categorising content in PW by Kongondo https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ You will understand how much flexibility you gain by storing all data as pages and referencing them with page fields, instead of using simple text fields. 2 Link to comment Share on other sites More sharing options...
tuxy Posted February 12, 2015 Author Share Posted February 12, 2015 Hi there, very nice project Before doing anything, read this tutorial about categorising content in PW by Kongondo https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ You will understand how much flexibility you gain by storing all data as pages and referencing them with page fields, instead of using simple text fields. Hi @diogo, Thanks The goal of this project: - a portal for guests - a platform for vendors (members) Wauw! Thanks for the link to this great tutorial I print it out, and read it this evening Regards, Christophe 1 Link to comment Share on other sites More sharing options...
jacmaes Posted February 12, 2015 Share Posted February 12, 2015 Hey Christophe, I built this (cultural) event site with PW, and it might be of interest to you: http://www.spainculture.us/ Think carefully about the initial structure that makes most sense for your project. In my case, since we're talking about events organized in different cities around the U.S., I chose to build the tree this way: This "geographical structure" is very intuitive for editors as they're able to quickly add or edit events by looking for the city where the event takes place. Much faster than having all events under one place, e.g. a page named "Events". When editing or creating an event, editors can choose categories (architecture, culinary arts, etc) from a simple pull-down menu: This menu is a page field, like Diogo recommended above, which references the categories that are organized as such in the tree: I hope this helps you understand the power and simplicity of page system in Processwire. 7 Link to comment Share on other sites More sharing options...
tuxy Posted February 12, 2015 Author Share Posted February 12, 2015 Hi @jacmaes, You have develop a beautiful event-site My first work is read the tutorial that @djogo advice. But your post is very interesting with the screenshots. This is veryveryvery helpful The structure is very important, it is the foundation of a good page-structure. Thank you very much for helping me Regards, Christophe Link to comment Share on other sites More sharing options...
tuxy Posted February 12, 2015 Author Share Posted February 12, 2015 jacmaes, In your page-tree, I see 'related' icons: 'geo' and 'calendars' This is very logical. How can I make this similar? Show this icons automaticlly when add a 'DateTime'-field or a 'Geo'-field in a template? Sorry but i'm a newbie with PW And also sorry for my bad english Christophe Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 13, 2015 Share Posted February 13, 2015 You can assign each template its own icon in its settings. 2 Link to comment Share on other sites More sharing options...
tuxy Posted February 13, 2015 Author Share Posted February 13, 2015 Hello, The PW demo 'Skyscrapers' is also a good point to start my project! Yesterday reading the interesting tutorial that @diogo advice me. After research the best solution for structure the pages is: ../province/city/event Ok, this part is solved, for a good start in PW! An important question... A city has 2 different events (by date): 1. Events thats repeat every week the same day (ex: every friday or every friday and saterday) 2. Events that NOT repeatly every week/month, but once or more times in a year on random dates. What is the best solution the combine this to different events? Point 1: the biggest problem here is when add an event that repeat every week (1 or more days), this is a lot of work add every date for this event for a whole year. (Drupal has a Date-module for this with options for repeat an event every week/month) Is the best way for this a multiselect/dropdown days: monday, tuesday, ... , sunday ? Point 2 : is simplest with events-module, i think What is the best solution for combine this to different events-types in one template (content-type) for PW? Christophe You can assign each template its own icon in its settings. Okay, thats interesting Thank you! Link to comment Share on other sites More sharing options...
jacmaes Posted February 13, 2015 Share Posted February 13, 2015 Not sure about the most flexible way to achieve what you want to do in point 1. I would also be interested to have some input from other forum members. But for point 2, the events module is an option (or the table pro field), but I would encourage you to create a page for each event, which in my opinion would give you more flexibility – you're not restricted to a few fields in a table, but you could keep adding more fields like an interactive map to locate your event (see Ryan's great Map Marker module) – and is probably a lot more scalable in the long term. This would also be a great opportunity to learn how to retrieve and manipulate information from pages. Here's an example of how you'd retrieve a list of all events taking place today, taking into account that they can either be ongoing (e.g. they started a few days and are still going on) or new (they've started today): $events = $pages->find("template=event, start_date<tomorrow, end_date>=today, sort=-start_date"); Quite simple, isn't it? Bonus 1: find all event current and upcoming events in the next 2 weeks and limit the results to 18: $events = $pages->find("template=event, end_date>=today, start_date<today +2 weeks, sort=-start_date, limit=18"); Bonus 2: find all past events: $events = $pages->find("template=event, end_date<today, sort=-start_date"); Good luck. 2 Link to comment Share on other sites More sharing options...
tuxy Posted February 14, 2015 Author Share Posted February 14, 2015 Hi @jacmaes, This is very helpful I understand what you explain In attachment you see the beginning of the events-project, with icons (thank you @LostKobrakai) : The provinces has childs: Province. Each province has childs: cities. Provinces - West-Vlaanderen -- Nieuwpoort -- Koksijde -- ... - Antwerpen -- Berchem -- Zwijndrecht -- ... (Belgium has 588 cities and 11 provinces) Each city has childs events. Ok, I follow your advice => add an event for each date. (if the same event 2 times a year, then this are 2 pages, but each with his own DateTime). Is it possible make a dropdown for provinces? And if a province selected, the related cities are displaying? Is this difficult in PW? In your screenshots i see a lot of info in the title. Is this add manually? Or is this automatic generated (combined fields) Sorry for all this questions. I learn a lot ;-) Christophe Link to comment Share on other sites More sharing options...
jacmaes Posted February 16, 2015 Share Posted February 16, 2015 Is it possible make a dropdown for provinces? And if a province selected, the related cities are displaying? Is this difficult in PW? I'm not sure what you mean here. Are you talking about a dropdown menu on the front or back end? In any case, you can just keep expanding your current tree, which in your screenshot above is limited to provinces, and add all the respective cities below each province. To avoid doing this manually, you can use Adrian's Batch Child Editor module. In your screenshots i see a lot of info in the title. Is this add manually? Or is this automatic generated (combined fields) This is automatically generated. Go to your template, Select the "Advanced" tab, then add the fields you'd like to see under "List of fields to display in the admin Page List". Link to comment Share on other sites More sharing options...
tuxy Posted February 17, 2015 Author Share Posted February 17, 2015 Jacmaes, Wauw! That's excellent how make automatic titles. The multiple related dropdowns are for the front end. When select a province (parent), another dropdown shows the related cities (childs). This weekend a person ask me for make a website and now i'm happy that I can make this for the first time in PW. After a few days of searching on the forum, look PW videos, asking, ... now I understand how the CMS/CMF works! Simple, good, robust, flexible, .... I like this nice CMS/CMF. A happy newbie Christophe 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now