#Routing nested pages

22 messages · Page 1 of 1 (latest)

worldly badge
#

WidgetsHTML folder includes 4 html files that are actually widgets

#

They will fetch the html,css,and js and load a widget

#

When referencing them directly, example in sessions, agenda, tickets, they do load fine, but that blocks me from manipulating their position and well loading the layout, since thats an .astro component

#

My solution was creating a testing.astro file, where inside the HTML will be passed down to the astro component

#

And this does work perfectly when the testing.astro file is put directly into root of pages folder and href=/testing

#

However, due to organization of the project, its neccesary to create subfolders

#

As in the first screenshot, creating a subfolder called widgets and puting testing.astro inside of it, breaks the component

#

@subtle wind In case you dont see the support tag 🙂 Thanks for helping

subtle wind
#

OK, when you move testing.astro into a sub-folder, are you updating the Speakers import statement to the correct path?

#

and the Layout?

#

and the styles?

#

You'll have to change each of them from ../whatever to ../../whatever

worldly badge
#

I did that. Is this right?

subtle wind
#

You only changed one import, you have to change all three

worldly badge
#

Oh dear lord

#

Im so sorry dude

#

Well this is embarassing

#

In my defence, had a wisdom tooth removed this morning so im still under the influence haha

#

Thank you so much Henri

subtle wind
#

No worries. Sometimes it's the little things. But do setup aliases, it'll make your life easier.

worldly badge
#

Will check them out. Cheers !