Hels

maybe you mean this module: https://github.com/Rhym/silverstripe-cms-theme discussed in a blog here: https://www.silverstripe.org/blog/developers-module-of-the-month-colouring-outside-the-lines/

Show 3 attachment(s)
Rhym/silverstripe-cms-theme

Theme for the Silverstripe CMS

Rhym/silverstripe-cms-theme

Theme for the Silverstripe CMS

silverstripe.org  
Module of the Month: Colouring outside the lines

Style and brand the CMS with the SilverStripe CMS Theme Module. This 'Module of the Month' makes it easy to change the look and feel of the CMS to match your client or agencies branding.

Hide attachment content
Hels

nevermind, I tried it out & that is exactly what is needed

Hels

In the docs example they create a function to use for the grouping. I just want to group by one of the db columns. but do I still need to make a function to get the db column to do the grouping? (its not working at the moment just using the db column name as the grouping thing)

Hels

hmmm that might need to wait. Next priority is to figure out how to get the mailchimp webhook to work so I can have new entries added automatically instead of repeating the csv import. (there were an extra 28 signups yesterday from when I first tried the import to when I got it working!) don’t feel like doing regular down/uploads!!!

🙂 (1)
Hels

oooh that looks really good - seems like it would make a prettier layout on the page too! (as in I can loose the theme column from the table that has many repeated entries!!)

Hels

ooops - I did try the documents but somehow didnt find that bit!

Hels

oh yeah, & fyi $RegisteredSpeakers comes from the controller like this:

  1. public function RegisteredSpeakers() {
  2. $member = Security::getCurrentUser();
  3. if ($member) {
  4. $team = $member->Team()->TeamName;
  5. $registeredSpeakers = Speaker::get()->filter([
  6. 'Team.TeamName' => $team
  7. ]);
  8.  
  9. }
  10. return $registeredSpeakers;
  11. }
Hels

is there a way to do nested sorting in templates? I currently have <% loop $RegisteredSpeakers.Sort('LastName').Sort('FirstName').Sort('Theme.ThemeName') %> which sorts by Theme but ignores the others. My intention was that it would sort by theme, then within each theme sort by first name, then if there was more than 1 person with the same first name they would be sorted by last name

Hels

For the benefit of the archive (& future me who will undoubtedly check the archive for this exact same then NG some time from now!!!) All the issues importing to a data object with a has_one relation were nothing to do with the data object, the hasone, relationCallbacks, or any other part of code. It was entirely_ due to excel messing with the csv file! Note to future self - stick to your principles & only ever use Google sheets!!! 🤣