PaulAik Posted March 27, 2015 Share Posted March 27, 2015 I'm looking at choosing ProcessWire as my 'go-to' PHP CMS came up with a couple of site architecture/CMS feature type questions along the way. I'd be grateful if someone with some ProcessWire experience could weigh in on some things I queries/assumptions I up with... Content: If I have a repeated data item (e.g. such as an image slider with the fields Image, Title and CTA Link), how do I represent this in ProcessWire? The options I've seen so far appear to be...Fake Pages: Creating a structure under the page containing the image slider data nodes (maybe in a container folder, so HomePage > Slider > Slider Item 1... etc) Custom Field: Building a custom field with the properties I need. This doesn't seem to be 'the ProcessWire way' for this sort of requirement? Preview Function: There's no 'preview' functionality baked into ProcessWire. API: The ProcessWire API is pretty powerful, with functions to access the entire CMS content tree. Controllers: I don't think there is a concept of controllers (in an MVC sense) in ProcessWire, but 'Modules' could be a viable alternative? I'm thinking about those moments where there's business logic that needs to be taken care of (form processing, etc). Thanks! Link to comment Share on other sites More sharing options...
Macrura Posted March 27, 2015 Share Posted March 27, 2015 Content: If I have a repeated data item (e.g. such as an image slider with the fields Image, Title and CTA Link), how do I represent this in ProcessWire? The options I've seen so far appear to be... your options for a slider are several.. here are two common options: 1.) Repeater - the repeater is a type of field that can repeat the same content pattern over and over on a page. You can specify which fields to use in the repeater. repeaters are really pages, that are just hidden from the normal page tree. I was just working on a site where their homepage slider is done with a repeater. You don't hear much about them now that there is Page Tables, tables, and profields multiplier; however repeaters are still an indispensible part of the the PW toolkit and when used for the right purpose are great. 2.) Pages, and PageTable You can setup a hidden branch of the page tree (e.g. settings) and below that store various things, one of which could be sliders; so you would have something like: /settings/slider/slide1 /settings/slider/slide2 the template for slider could be called 'slide-folder', or 'slide-index' and then template would be 'slide'. your slide template would have whatever fields you need. the slides themselves will be added by the pagetable field Next you would setup a pageTable field called slides and you would specify that the new slides are added to that /settings/slider/ branch. 6 Link to comment Share on other sites More sharing options...
diogo Posted March 27, 2015 Share Posted March 27, 2015 Hi PaulAik, welcome to the forums! You're assumptions are in general correct, but: Fake Pages: Actually, I would say this is 'the ProcessWire way'. In PW everything is a page, so, what you call "fake pages" are simply pages that are not shown in the frontend and are used mainly as data holders. Read this fun text by Joss about this subject https://processwire.com/talk/topic/2296-confused-by-pages/ You can also use repeaters, page table (core module) or even the image extra and image extra multilanguage fields. Preview Function Not yet, but there is a module and drafts are in the roadmap. Controllers: I don't think there is a concept of controllers (in an MVC sense) in ProcessWire ProcessWire doesn't impose almost anything to you, you can use whatever strategy you prefer. MVC was already discussed a lot, have a look at these edit: dang Macrura! 6 Link to comment Share on other sites More sharing options...
adrian Posted March 27, 2015 Share Posted March 27, 2015 Another possible solution on the slider front is ImageExtra http://www.kf-interactive.com/blog/adding-custom-fields-for-images-in-processwire/ It is very powerful and capable of much more than sliders, but will easily allow you to specify a link to internal page / external URL, an extra caption field, and anything else you might need. 3 Link to comment Share on other sites More sharing options...
PaulAik Posted March 28, 2015 Author Share Posted March 28, 2015 Appreciate the replies guys. I was like "where are these fields they speak of?!", then realised they were there... I just had to install 'em! 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