Closed jamestagal closed 1 year ago
I don't see the let slideNumber = allContent.filter((content) => content.type === "project1");
code in slides_nav.svelte, is this pushed? Am I looking at the right file?
Hi @jimafisk oh yes I hadn't pushed it to the repo. I have now. 😄
Hey @jamestagal, it looks like allContent
wasn't getting passed originally in layouts/global/html.svelte
. I just pushed an update that should fix that error.
hi Jim. Oh ok. 😸 thank you.
Hi @jimafisk
For the Showcase section of my site, I am trying to set up the
on: click
events for the ui of theslide_nav
component however when trying to reference theproject1
content type and extract theorder
field from the data source, I get the following error: Though I think I am referencing the content correctly!In the
slides.nav.svelte
file I reference the contentproject1
where the slides are as follows:Then I added a variable to record the
selectedSlide
as follows:In the
slides.nav.svelte
file I am looping over the fields using an#each
block. See example for theforward
andback
buttons only . Then add theselectedSlide
variable to the on click event.Please let me know if you can see my errors.
Regards, Ben