Jump to content

Recommended Posts

Posted

I'm building my personal site, and I'm new to ProcessWire. 

I have pages with poems, and other pages with writing. 

Should I use a generic content Field for the main content of each page? 

Given the flexibility of Fields, it seems like having separate content Fields would allow more flexibility later on, but having content_poem and content_writing (and more and more content Fields) is unnecessary duplication. 

What's best practice for PW? 

Posted

Hey @lonetour

I've often wondered this myself and the main benefit for me of having separate fields is

1. You can customise the editing options of each individual field by having separate fields
2. See above is especially useful for clients where you might need to lock down their formatting options. Doesnt sound like it's applicable to you.

Fields are relatively cheap in terms of database and performance cost, so personally why not try two separate fields?

I just name mine 

  • body_poems
  • body_writing

which is handy in the fields page (Setup>Fields) because they are listed alphabetically next to each other and I can identify the purpose from the name.

When I've used a single standard body field for multiple types of content in the past, I've had to forensically try to establish which variety of content might be affected by a simple change. So thats just the background as to why I came up with my process.

TBH you'll find as many people suggesting the opposite. The beauty of PW is it's flexible enough to handle both methods and it sounds like your site might be small enough to simply try it and adjust as you proceed?

Good luck with the site.
P

 

Posted

hi,

like @Peter Knight i tend to create different content fields when i need specific types of content, toolbar and so on
sometimes if i need a "normal" content field in which i may have standard text content around specific content needing specific css layout, i also use the same content field with either the tinymce template plugin or simply my own div plugin
https://github.com/virtualgadjo/pw-tinymce-div-plugin
that allows to insert a div in tinymce with its own class (i.e div class="poem")
this allows to define css class for those div's content as well in tiny window as on the frontend css (.poem p [} .poem h2 {]...)

like almost everywhere in pw there are many ways to do what you want, choice is yours depending of what is the easiest and fastest for you

have a nice day and of course pw trip 🙂

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
  • Recently Browsing   0 members

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