Jump to content

Matt

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Matt

  1. On my band template I have a Repeater that holds revisions of band biographies - this contains two fields, a 'Description' TextArea and 'Start Date' DateTime which defaults to today's date. Does anyone know a way to set the sort order of Repeater Items, i.e. prevent their rearrangement by dragging? I would prefer to sort, newest first, using the Start Date field. I know a PageTable can display a grid view with customisable sort criterion, but this option is out of the question as its rows are non-collapsible - my 'Description' fields can be quite lengthy (multiple paragraphs) so expanding all revisions/rows at once will clutter the admin interface. Ideally, my Repeater would only open the Item with the most recent Start Date when the page is brought up for editing; all previous revisions/Items would initially be collapsed. Could this be solved by writing a simple module that arranges the Repeater Items on loading and saving the page in admin? Or perhaps extending/modifying the Repeater FieldType to disable dragging (even just by hiding the icon)?
  2. Thank you for introducing me to this - I had my RuntimeMarkup table up and running in no time!
  3. Hi Robin, thanks for the tip with the start date - great idea. I've seen it mentioned on this forum that PageTables are superior to Repeaters... My understanding is that the pages created by PageTables require names - these can be entered manually or automatically generated from the title field (which for the case of my repeating description/image unit, is unnecessary) or using an 'Automatic Page Name Format'. If Repeater fields essentially do the same thing, only storing the repeating unit pages somewhere obscure in the admin category with no need to explicitly specify a name, then am I OK to continue using Repeater fields for this purpose? While I like the idea of the repeated bio pages being children of the band in question, does it really matter? Somehow I managed to completely miss the 'link selected pages to page editor' setting on my band page field! Now I can update band descriptions as I create new events. Is this a fairly recent addition? I even tried installing the AdminPageFieldEditLinks module (which appears to do the same thing), but this threw an error whenever I tried to edit an event page, all of which contain that band page field. I was also wondering if it's possible to view selected fields, e.g. the latest description/image from the referenced band page, in a page field, perhaps in tabular form similar to how a PageTable is presented? It would be useful to view such details at-a-glance when bands are added to new events, so it can be easily determined whether the latest revision of their info is still accurate. Each row (page) could then be clicked on to bring up the modal page editor window. Unfortunately, PageTables in their current implementation do not let you reference existing pages. I found a couple of old threads about this... I know you can set a custom label format for pages listed in the page field but this will not work well with paragraphs or images, nor are there sortable columns. https://processwire.com/talk/topic/8497-page-table-meets-page-field/ https://processwire.com/talk/topic/11820-page-field-vs-pagetable-field-differences/
  4. Hello everyone! I recently downloaded ProcessWire and after playing around with it I've found its flexibility and ease of use to be really promising. I'm working on a site to publicize upcoming live music events and archive past events at our venue. Each event has the usual start time/end time/price/etc fields and can be associated with any number of bands (usually just one or two). Each band has name/website/description (short bio)/image fields. At the moment I have a page field on my event template allowing each event to be tagged with the required bands, either by choosing existing band pages (for bands which have played at our venue before) or by creating a new band page. I can then reference each band's name/website/description/image in the event template php. There are two key ways users will discover events on the public-facing site: 1) Through the events index page, listing events which can be filtered using dates and keywords 2) Through the band index page, listing bands whose pages will list past/upcoming events where they have performed. However, since: a) many bands have gone through minor lineup changes since they started playing at our venue, b) many bands have released (and want to promote) new material since they started playing at our venue, each band's description and image fields might (but not always) need to vary between events. I would like past event pages to show the band's description/image that was relevant when the event occurred, not the most recent revision. On adding band pages to new events pages, I would like the default description/image to be the most recent version for the band, with the option to replace this with a new description/image if required. It would be unnecessary to provide a new description/image for each band at each event if there were no lineup changes or releases of new material since they last performed. My first thought was to have a repeater field for description/image/start time/end time on the band template, where the start and end times help my php template decide which description and image to pair with a particular event. However, the band page field on the events template will not allow me to edit the referenced band page's attributes; it only lets me select band pages and reorder them. If I wanted to update the band description (while preserving the history of previous revisions) I would therefore have to find that band's page elsewhere in the admin then add a repeater row and enter the new description there, keeping the image field blank for that row if the image doesn't need updating. This would require the start time (of the new row) and end time (of the previous row) to be input manually... I'm convinced there must be a simpler way to maintain the links between events and band info. My current structure is: Home -- Events Index ---- Event 1 ---- Event 2 ---- Event 3 -- Bands Index ---- Band 1 ---- Band 2 ---- Band 3 Apologies if I've misused any terminology Could anyone advise on sensible strategies for achieving this using Core ProcessWire or modules? Thanks!
×
×
  • Create New...