Jump to content

Which field-type to use


munkypuzzle
 Share

Recommended Posts

I've spent today "playing" with processwire and it looks great, but I have a question on the best way to implement something.

I am building a small knowledge-base type of site that will have FAQs and some useful documents/files to assist users. The user will be able to select one of the FAQs, then view a paragraph or two that will answer the question and there will also be links to some "useful documents" in PDF or Word doc format and "useful sites" which will be external URLs.

From what I've seen in processwire so far, the FAQs and the links to files will be no problem. For the files there is a "file" field-type that allows you to attach multiple files but when I add a field of type "URL" it only seems to allow me to add one URL.

I'm totally new to processwire, so I may be looking at this the wrong way or missed something obvious. So, my questions are:

1. Am I missing something obvious?

2. Is there an easy way to modify the URL type to allow multiple URLs?

3. Is there another/better way to do this?

Thanks for any advice

Link to comment
Share on other sites

You need to read up about Repeater fields.

Basically, they allow you to group fields together - so for your external URLs, you can have the URL, friendly title, description, image, review - whatever you need. And then repeat that little collection as much as you like.

You need to actually install the repeater field - it comes with the installation but is not installed by default.

http://modules.processwire.com/modules/fieldtype-repeater/

  • Like 1
Link to comment
Share on other sites

I agree with Joss that repeater sounds about right for what you've mentioned. But if you need infinite scalability, I'd suggest creating a new template to represent your data table, and then make each entry of it a page.

Link to comment
Share on other sites

Thanks very much, the repeater sounds perfect.

I started building a quick sample and noticed that when I attach files to a page, those files are only available on that one page. In my case, some of the documents may be suggested as "useful documents" on several different FAQs.

Ideally, I would like to reuse the attached documents across several pages. How would I do that? Ryan,would your data table suggestion solve that for me? if so, could you give me a slightly more detailed explanation of that? I'm thinking that perhaps I create a "page" for each document (or item in the data table) and then use the "page" type field to insert them into a template page, but this is still all very new so I might be way off the mark.

Again, thanks for your help. I'm loving processwire so far.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...