I can not reuse the carousel package because these carousels need the campsite site’s slug as a first parameters: i can not have a relation per campsite type, as i do in home and services pages, because the campsite types are added by administration types; even if i had a single relation for slides of home and services pages, these would go in a different relation due to the foreign key to campsite type. What i could reuse, however, is the Slide and SlideEntry types from that package, although i had to export carousel.Translation to be usable from the types package. I should change that to use locale.Translation, but this was the easier option, or i would need to change the queries and templates for carousel package too. Besides that, they work exactly like the slides in home and services pages.
46 KiB
46 KiB
