Jump to content

Which comes first the fields, pages or templates?


zilli
 Share

Recommended Posts

When you start a website from scratch and have to make both front-end and back-end of it, how do you set up your workflow?

I’m a bit confused because 1) I’m new to PW 2) I’m setting up a marketplace where the vendors need to have access to the back-end, so they can manage their services/products, which will be listed in the front-end for “normal” users to buy them. More beginners' questions:

  • What do you do first the back-end or the front-end?
  • Is it correct to think of fields -> pages -> templates in this order? If yes/no why?
  • Is the product page that the "normal" user see in the front-end, the same that the vendors have access in the back-end?

Thanks!

Link to comment
Share on other sites

Hi,

I recommend doing some basic system design to sort out the relationships you will be dealing with. Here is a good article from @clsource on this:

https://medium.com/@clsource/understanding-processwire-templates-fields-and-pages-201aecd0a1a4#.m9yquavll

Next, decide what sort of Inputfields you will utilize in the admin in order to realize the relationships (look for 3rd party Inputfield modules too, but check PW 3 compatibility before you start using them). Start with the Page Tree, and decide what you want to present there, and other relationships can be represented by the selected Inputfields.

You can start by working on both the frontend and the backend at the same time. If you are a solo developer, you will not be able to separate the two anyway.

Thinking of "fields -> pages -> templates" isperfectly fine, but you can implement them in any order you see fit.

"Is the product page that the "normal" user see in the front-end, the same that the vendors have access in the back-end?"

It cannot practically be the "same", except if YOU for some reason implement it this way. You can give normal users (customers) limited access to the admin, but it all depends on your needs. Probably you only want to give partial access to the backend for vendors only. Normal frontend users (customers) will likely be better off with your own custom implemented frontend UI access.

Hope this helps :)

  • Like 2
Link to comment
Share on other sites

Thanks @szabesz. You are right, I want to give partial access to the backend for vendors only. So, my question is how should I set up the backend to allow the vendors to be able to update a calendar? Then, this calendar will be showed in the vendor's frontend page.

  • Like 1
Link to comment
Share on other sites

There is a recent discussion about calendars and events over here:

I also recommend doing a google search like this: event calendar site:processwire.com/talk

As for pimping the admin, there are all sorts of techniques to tweak it to your needs. Of course, you will need to deal with Roles/Permission, but you might really want to consider using @adrian's Admin Restrict Branch: https://processwire.com/talk/topic/11499-admin-restrict-branch/ 

Edited by szabesz
typo
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...