Jump to content

Robin S

Members
  • Posts

    5,032
  • Joined

  • Days Won

    340

Everything posted by Robin S

  1. I'm building my first site in ProcessWire, and I'm using the Stable branch. But I see some attractive features in the Dev branch. So my questions are about how safe it is to use the Dev branch, and who the Dev branch is "for". Is the Dev branch actually pretty stable? Do those of you using the Dev branch run into bugs very often? And is it recommended for ProcessWire experts only? I get the impression from what I've been reading in the forum that quite a lot of people use the Dev branch. Would it be unwise for me, as a ProcessWire beginner, to build my first site using the Dev branch?
  2. Nice! The dev branch commit that adrian linked to above will make importing Page fields easier because it will allow the title string to be used instead of the page ID, but your code for creating new select options is a real bonus. Thanks!
  3. You know, I probably would have because my site only needs a single select dropdown containing half a dozen options. But good point - I should get in the habit of using the power of the API whenever I can.
  4. Thanks, good to know. When I'm ready to do my import I'll check the module page to see if an update is published.
  5. Thanks for the replies. Using phpMyAdmin I checked what is saved to the database for my Page field and it is indeed a page ID number. So that answers my question about how to prepare my CSV for import: text values for fields that will be managed with a select dropdown in PW (using the Page fieldtype) will need be translated into their page ID equivalents. Naturally this means that all select options need to be set up in advance so their page IDs can be found. Modifying the ImportPagesCSV module sounds pretty straightforward and that's probably the way I'll go. The bulk import of pages will only happen during the initial site development so the issue of the module changes not surving a module update won't be a big problem. That sounds like you use the PW API for CSV importing rather than a module like ImportPagesCSV. I'll start with the module approach but if I have problems with that I can look at using the API for the CSV import. Thanks again for your help.
  6. I think you may have misunderstood what I mean. That module would be useful for creating the pages for the select field options, but what I'm asking about is importing pages of content where some of the content fields I want to be editable in the admin using select dropdowns. Take my bibliography_type field, which will have select options like "Book", "Journal Article", "Conference Paper", etc. When that field is set up in ProcessWire using the Page fieldtype those options will be mapped to page IDs (I think) and it is those page IDs that get saved to the database (I think). In my CSV of pages the "Bibliography Type" column will contain the values as text, but I suspect PW is not going to want them in that format. Do I need to find the page IDs for each select option and replace the text in my CSV with the page ID equivalents? Or can I just import my Bibliography Type values as text?
  7. Thanks for the replies. Issue 1 is now solved - I tried playing around with some of the options for the field I'm using as my select and setting "Deference in API as" to "Single page (Page) or empty page (NullPage) when none selected" allowed me to use $page->bibliography_type->title This setting isn't mentioned in the Wiki article (whoops, it is ), and I think it would be useful to have some documentation for the Page fieldtype in the API seeing as the ProcessWire method for creating common controls like select and select multiple is a bit unorthodox (although powerful). Any advice for issue 2? I'm going to need to import a large number of pages from CSV (using the ImportPagesCSV module I expect) and if that's going to be problematic to do in conjuction with using the Page fieldtype I had better rethink how I set up the fields.
  8. I'm new to ProcessWire and trying to get my head around the recommended method for creating <select> controls in the page editor. A couple of questions... 1. I'm following the advice here and I think I have everything set up properly for my "bibiography_type" select control. However, when I attempt to output the "bibiography_type" field in my template I get the page ID of the select option rather than the page title or the "select_value" text. Im using: echo "<p>{$page->bibliography_type}</p>"; ...which outputs "1024". I tried... echo "<p>{$page->bibliography_type->title}</p>"; and... echo "<p>{$page->bibliography_type->select_value}</p>"; ...but these don't output anything. How do I get the "title" or "select_value" of the selected option "page"? 2. I understand how the ProcessWire method of creating select controls allows for a lot of flexibility (the ability to edit select options in the future, etc). But I expect this means the data that is stored in the database for the select control is something like the page ID of the selected option rather than the text for the selected option. If I am importing new pages from a CSV, do I need to translate the text for my "Bibliography Type" field into a corresponding page ID? So for instance if the "Bibliography Type" for page I am importing is "Book", do I need to replace this with "1024"? Are there any other requirements for importing pages containing data that will go into a select control in ProcessWire?
  9. Hi Adrian, Thanks for your advice. Your first suggestion sounds like it's an easy option. I tried using your Migrator module and I think it worked for the most part - it changed the admin URL from what I had originally which threw me for a bit because I was getting 404s, but I soon worked that out. The only other issue I noticed was that the restored profile included your admin user account but that wouldn't be hard to fix. I think it's probably best for me to just do a new install from scratch and choose the blank profile. I've found that using Softaculous to install ProcessWire also gives me the wrong timezone setting so fixing that and the profile issue would probably take longer than doing a "normal" PW installation, so I think in future I won't bother with Softaculous. Thanks again for the suggestions.
  10. I'm new to ProcessWire, but based on what I've read so far I can see PW becoming the CMS I use for all future sites. It would be handy to be able to use Softaculous to install PW, but this results in the "Minimal Site Profile" being installed and there is no option to choose the blank profile. I also have a second installation in another hosting account that I selected the "Beginner" profile for during install (to learn the ropes) and now I would like to change to the "blank" profile to start proper development. So my question is: is it possible to clean out an existing PW installation to go back to the equivalent of what you get when you install PW with the "blank" profile? Or do you have remove everything and do a new install from scratch?
×
×
  • Create New...