Jump to content

Zenophebe

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Zenophebe

  1. Well, as I understand it, I think you're misunderstanding what a content type is. From what I can see, ProcessWire doesn't have the concept of content types, only pages that show certain fields. This isn't welding fields together to create a content type, it's just creating a huge mish mash of data that only exists as a 'content type' at view time. Making pages children of another page called, say 'products' doesn't create a product data / content type.
  2. i was thinking more like drupal approaches content types, but of course, not as bad as drupal. content types as being types of content, not as in file types.
  3. Exactly, 'page' is the base content type - it shouldn't be. there should be several base content types, and then in the admin, it can be, "add new skyscraper", "add new architect" etc. A template shouldn't be used as the glue to glue the fields together, that doesn't create a type, it just creates a group of fields. The concepts of a skyscraper or an architect are non-existant when using pw! And using "Page" as the base type is just confusing as anything! It should require minimal changes surely? Each content type can have one or a set of templates, so the creation of an item should be similar?
  4. Yes, that's correct! Hence my question about a field that would allow such logic.
  5. I don't consider using the template file because the template file is for presentation, and has nothing to do with the logic. If I wanted to query using the API, what delivery companies could deliver for a product and I used logic inside the template, I wouldn't be able to do this.
  6. Why isn't the hanna plugin suitable for this? Is the hanna output stripped and formatted to HTML preventing the insertion of JS?
  7. I've started to put together a system with PW, and I have a problem which has stumped me. I'm in need of a field which can perform logic. I have a 'content' type of Products with all necessary fields, and a list of parcel delivery companies. Depending on the size and weight of the product, certain delivery companies will not deliver the product, and delivery companies offer different insurance amounts with different prices. So, for each product, I'd like to list the delivery companies that will handle the product based on size and weight and then order by their price, showing the company name, the price and whether their insurance amount will cover the cost of the product. I'm thinking that stripping my needs to the lowest common denominator, it'd be some sort of field that I can specify code in to filter the results, and specify how the order of the content is shown. (If PW had content types, I'd also specify what content types the code applied to for example) So, how can I go about solving my problem? Thanks
  8. Hi, complete newbie to ProcessWire, and it's eerily similar to something I was working on for myself. However, there's one striking difference which I'd like to suggest for processwire. Not all content can be represented nicely as a 'page', so I was hoping it'd be possible to have a base content type with some set functionality, and each content type inherit from this class. Therefore a page would inherit from it, and then add all the relevant page methods and members, and each content type can be used to populate pages. E.g. each uncached page would initiate a db request for data, and that data is populated into separate vars, for example: $page->body->author->name $page->body->product->title $page->body->article->body etc. Having separate content types would allow logical grouping of fields, and also of managing data. This could be stored nicely in the database because each content type could have its own table, and fields be added as necessary. From what I can see so far, it looks like processwire already separates the fields of the page, so although I haven't looked at the code too much, it shouldn't be too much to use a base Content class?
×
×
  • Create New...