Search the Community
Showing results for tags 'structure'.
-
Hi everybody, we started our first Processwire driven project in my new company and for the first time, I was working on one site with more than 2 colleagues on the same site. It didn't take long for us to stumble across some problems when multiple developers work at the same time, conflicts with updating the database on vagrant machines, like duplicate entries for page IDs, errors when setting up fields and stuff like this. We ended up working on a dedicated database server, that we linked to our vagrant machines and most of the problems were gone, but the performance of this constellation is really bad compared to our first approach with database running on vagrant machines. I already tried to find a solution in the forums but I couldn't find anyone with problems like this. So I was wondering: how do you manage projects with multiple developers on vagrant machines in a git-based workflow?
-
Alright. So I'm converting a site I already have to Processwire (really enjoying it so far!). I wanted to convert the previous tables that I had data in to Processwire pages. But I'm wondering what the optimal way to structure pages would be. So basically, I have three main tables. Users (and all accompanying information) Items (and all accompanying information) Aquariums (each user only has 1 aquarium. Currently, user_id is a FK) Fish (type of item. Aquariums may have multiple fish) Aqua_settings (Things like lightness, temperature, etc) So in my current setup, there are a lot of Foreign Keys. I could accomplish essentially the same thing by using the Page Reference field. Alternatively, I could make fish and aqua_settings both be children of Aquarium. I could differentiate by doing $aquarium->children('template=aqua_settings'); or something. So my question is...should I be using the Page Reference field or structuring the pages as children? (Or are both equally fine depending on how I want to go about doing things)
-
Hello! I am using ProcessWire for a good three years now already, and I am really happy with the flexibility it provides. There is one thing though that bugs me. For a recent project, I need lots of templates. I already have a site/templates folder polluted with a package.json, yarn.lock, node_modules, errors, .eslintrc, .git and my entire build setup. And I thought: OK - when I am forced to use site/templates for templates, is it actually correct to put all my javascript, styles, components, functions, classes also there? I mean, at least this is what the default theme encourages (they put styles there also) I read into other posts covering this topic about having a sub folder for templates. Because even with the non-template files stored somewhere else, the template files are still too many. Unfortunately, they also discovered that this is not possible: Sub Directories for Templates Should all template files put under site/templates folder What are your ideas? I already thought about having a page field, that defines the template path from a dropdown, but with this I would only reinvent an already almost working wheel. Thank you for your inspiration. Best, Martin
- 2 replies
-
- structure
- organization
-
(and 1 more)
Tagged with:
-
Effective approach for structuring events/bands relationships
Matt posted a topic in Getting Started
Hello everyone! I recently downloaded ProcessWire and after playing around with it I've found its flexibility and ease of use to be really promising. I'm working on a site to publicize upcoming live music events and archive past events at our venue. Each event has the usual start time/end time/price/etc fields and can be associated with any number of bands (usually just one or two). Each band has name/website/description (short bio)/image fields. At the moment I have a page field on my event template allowing each event to be tagged with the required bands, either by choosing existing band pages (for bands which have played at our venue before) or by creating a new band page. I can then reference each band's name/website/description/image in the event template php. There are two key ways users will discover events on the public-facing site: 1) Through the events index page, listing events which can be filtered using dates and keywords 2) Through the band index page, listing bands whose pages will list past/upcoming events where they have performed. However, since: a) many bands have gone through minor lineup changes since they started playing at our venue, b) many bands have released (and want to promote) new material since they started playing at our venue, each band's description and image fields might (but not always) need to vary between events. I would like past event pages to show the band's description/image that was relevant when the event occurred, not the most recent revision. On adding band pages to new events pages, I would like the default description/image to be the most recent version for the band, with the option to replace this with a new description/image if required. It would be unnecessary to provide a new description/image for each band at each event if there were no lineup changes or releases of new material since they last performed. My first thought was to have a repeater field for description/image/start time/end time on the band template, where the start and end times help my php template decide which description and image to pair with a particular event. However, the band page field on the events template will not allow me to edit the referenced band page's attributes; it only lets me select band pages and reorder them. If I wanted to update the band description (while preserving the history of previous revisions) I would therefore have to find that band's page elsewhere in the admin then add a repeater row and enter the new description there, keeping the image field blank for that row if the image doesn't need updating. This would require the start time (of the new row) and end time (of the previous row) to be input manually... I'm convinced there must be a simpler way to maintain the links between events and band info. My current structure is: Home -- Events Index ---- Event 1 ---- Event 2 ---- Event 3 -- Bands Index ---- Band 1 ---- Band 2 ---- Band 3 Apologies if I've misused any terminology Could anyone advise on sensible strategies for achieving this using Core ProcessWire or modules? Thanks! -
Hi, I'm building new categories below the homepage, such as : home /cycle /race /city /motorbike /roadsters /sports How do you handle what's going on if a user hits /home/cycle only ? I have nothing to show here. For now I've associated /cycle with the 'basic-page' template... Do I have to redirect to the first sub-page such as /home/cycle/race for example ? or do you redirect to /home in such a case ? Thanks
-
Hello, I'm struggling to structure my website, so I thought I could have a little help from you guys. I'm making a doctor/clinic appointment/booking type of website. The website will list several doctors/clinics. The user (front-end) will be able to choose one and make the booking. Each doctor has her own page and offers one or more type of treatment. Each doctor's staff will have their own profile page(back-end) where she can login and update their doctor listing and schedule. The back-end part is my problem. How would you setup that? Regards
- 2 replies
-
- appointment
- theme
-
(and 1 more)
Tagged with:
-
Hi Guys, I am trying to create a folder structure in templates folder because i going to have a huge list of templates so for future use i want to create a folder structure in template folder so returning user can easily find and modify them according to requirements. e.g i have few templates for pages and few templates which i am going to use in templates as includes files. i am calling them BLOCKS. so i want to create block folder into the template folder but in admin panel when i am adding new template it's not picking up block1.php file which is located in Templates>Blocks> ... Is there any option so we can enforce PW to pick folders from inside a folder in templates folder. Regards J
-
I saw in the 'template structure methods' in the doc section that ryan mentioned a mvc method for beginners. When will it be published? https://processwire.com/docs/tutorials/how-to-structure-your-template-files/page5 I'm just curious
-
Hello, in my project I have about 20 different content types eg: - basic item - news item - publication (image, description, view restriction etc.) - gallery - video file - document (file pdf, docx...) - project (project start date, project end date...) - manager profile (image, CV, position...) - company (company profile, products category...) - event (event date, location ...) - etc... Also there are shared content with additional templates ("widgets/blocks") where I have about 15 types of widgets (weather module, image banner, text banne, slider, header, link button, notification popup etc...). To reduce number of templates I create "category" template (for main content), and category template can show "list of news", "list of publications", "list of documents", "list of galleries" etc... Also category can have as child another category. Problem is that on some "list" need to show or hide some fields, need different number of items/per-page, need different sorting etc. If I use Ryan "Skyscrapers" concept and create pairs of templates eg: news -> news_item events -> event notifications -> notification galleries -> gallery videos -> video documents -> document publications -> publication projects -> project managers -> manager companies -> company discounts ->discount etc... In that case I will have very big number of templates/files (~40) but don't need many switches/flags. I really like option with "category" template, because it reduces number of templates, but on the other need to have switches ("show date", "sort (front) by..." "number of items"). Also additional "price" for that is bigger number of fields (page select). Also as small note, I don't use "hard core" checks in code (eg. by ID, template name, parent etc..) because I want to avoid administration mistakes/errors, and also to get much as possible flexible management in backend. What is your suggestion to reduce number of templates when you have many totally different content types? Right now I can see these options: 1. templates without files and "include/layouts"concept -> "fat logic" / "_func.php" 2. use files for everything -> "fat templates folder" 3. combination 1+ 2 -> chaotic (my current situation) Thanks and regards, Sasa
-
Hi guys, just wanna ask a simple question and may i get a ok from some experienced guys or a no-way - that helps me to avoid trashing to much time. For now i love PW - and build some easy websites - but i've a real webapp on the desk that screws "i wanna go live". Since i'm working in a NGO for farmers that share manpower and maschines together and we did the clearance for this special kind of service. So we wanna build a webapp where clients could send us records online. Long words short sense..... I've read kongondo's tutorial about structuring (even with colors) but anyway i wanna ask if i'm on the right track. Visible Pages (Frontend): Home (with login for different roles) ->role/login ngo-admin -Website (App) for the NGO (who gets records) --Dashboard --Settings --Import/Export (get the records) ->role/login agent/company -Website (App) for the companys/farmer (who sets records) --recording (choose some refered clients, choose refered services add values and save) --clients (partners from the farmers / remitter) --maschines/service --settings --send/sync (or more a clearing for the ngo admin) Cats and Dataschema: --NGO's (may this solution would used from other district offices, too) ---district one ---district two ... --Companys / Agents (Farmers as agents that do work or rent a maschine) ->special one project can have several firms ---agent one ---agent two ... (pagefield for related clients of this agent, settings, reference for records...) --Clients / Firms (here all firms available all farmers with theire companys even the related firms that linked under companys/agents) ---client one ---client two ... (adress and other relevant stuff, reference for records...) --Maschines/Services ---service one ---service two ... --Records ---record one ---record two ... (specific data, reference on ngo, project and client) May you get the idea - it's not so easy if clients of clients have clients, too regards mr-fan Edited some definitions for a better reading. The NGO setup the projects for the agents that assign what clients/firms has a agent to choose and the clients/firms for that he works. And get the records for clearance like with manuel printed delivery order's. The Agent can record his works and commit them. The client/firm has no login and it is only the data that is used by the agents like "contacts" or "remitter". Would be a kinda like an odermanagement but with not only two parties......
-
Hi, i'm working on a website with some articles and categories. The structure is something like this: Home +Articles --First Article --Second Article +Categories --Category1 --Category2 I'm using the categories page as a field to categorize the articles and create the sections of the general navigation (home / category1 / category2). Currently the URL for a section looks like example.com/categories/category1/ and i want something like: example.com/category1/ Any Ideas? Thanks!
- 10 replies
-
- categories
- url
-
(and 2 more)
Tagged with:
-
(WARNING: long philosophical post, with no immediate problem solving needed. This is for the ones who might feel like discussing data modelling in PW) Hello! I'm about to start a new project and I ran into a structural problem that I'm not sure exactly how to get about (although I have an idea): I have a project where all data will be tag-based: the same piece of data will show up in different places on the website. In other words it will 'exist' in more than one place. The PW CMS interface is based on a hierarchy, where everything needs to have one (single) main location. I have no desire to expose myself to XSL again, so I'll be solving this project with PW instead of Symphony (getsymphony.com) – my previous CMS of choice. But I'll use it as a comparison: If PW is based on a folder/hierarchy metaphor, Symphony is based on a relational database model metaphor. Symphony has sections (=tables) that can be 'joined'. They can be joined 'visually' (inline editing) with github.com/hananils/subsectionmanager/. It gives almost the same separation between presentation and data as any other old mysql website but mouse-click data modelling. Symphony gives less help on how my url's should be structured than PW. This project wouldn't actually be much easier to solve with Symphony, I would miss the friendly url/template hierarchy. But a match between PW and the subsection manager (allowing true many-to-many) would be so awesome that the gods of data modelling would step down from heaven for high-fives. On a sidenote: To be honest I never quite understood why they (Symphony) decided to create a relational database on top if the relational database - instead of making the best CRUD known to man, but I'm sure they have their reasons. Anyway, back to PW: I could solve this by letting each entry (page) have a main location. Let the path = tag. So that everything is forced to have a main 'tag' (path). Then a second field with secondary locations, pointing to other parents where the item 'reside'. The problem is that there will be two manoeuvres that essentially mean the same thing: Physically moving the page, and 'tagging'. I could turn this into my advantage, though: Having a single main location is good for other reasons. There are formatting options that would only apply to the main location. So this approach is quite OK, and this is most likely what I'll do in the end. I'm just curious if anyone would have any thoughts on this. J
- 24 replies
-
I'm building my first brand new Processwire site! It's easy and looks really extensible so I'm excited. However, I have a codeigniter app that is going to eventually sit in a directory beneath Processwire and I want to store assets like css, js, and images in a top-level directory that both CI and PW will access. Right now, I've accomplish this by using tags like `<img src="<?php echo $config->urls->templates ?>../../assets/images/russellbits-logo-small.png" alt="Russellbits"/>` Works fine, but it's messy. Is there another way I could do this in PW without making an http call?
- 2 replies
-
- codeigniter
- structure
-
(and 3 more)
Tagged with: