Subdirectory pages in a modular site

I need a little help. I’m trying to add subdirectories to a single page modular site. The structure is:
portfolio > projectName > project.md

What I can’t figure out is the linking for the page, or path. I want to have those pages open in a modal window (using the featherlight plugin), and I can get it to work if I add html files in the portfolio directory, but not if I add a directory and markdown file.

What would the URL be for the pages that live in the projectName folder?

TIA.

/portfolio/projectName should work

That’s what I thought too, but the URL comes up with a 404 if I try it in the browser and returns nothing in the modal window. Now, if I link to an html file using the full URL, it loads in the modal window just fine. The url being:
/user/pages/01.home/_portfolio/projectName/project.html

But if I switch to /user/pages/01.home/_portfolio/projectName to use the template markdown page. Nada. No worky.

This is a modular single page site, I’m not sure if that makes a difference or not.

So you have both *.md definition and *.html webpage in the same folder?

At this moment, yes. I put an html file in there to see if the linking was right, and I can open it, but the markdown doesn’t load; even without the html file in the directory.

So, to be clear. You have it structured like this?

  • 01.home (main page)
    • _portfolio (main page module)
      • projectName (non-modular sub-page of _portfolio)
        Would this be correct?

Yes, that’s exactly it.

Did you add to it any custom routing?

no I have not added any custom routing,.

Well, I did some quick reading on the featherlight, and I’m not sure if loading custom, external and procedurally generated website is possible at all, but we can try :slight_smile:
For sure, if you’d like to get into this page projectName from the _portfolio you should try links

  • /home/_portfolio/projectName
  • projectName

Also, could you please provide the code you’re using to display this lightbox link?

Okay. Thank you for the help. I finally got it. It was a combination of how I was structuring the URL, and the placement of the template file. I “thought” that since the projects folder was in the modular folder, that is where I would put it’s twig file. Nope. So I moved it to the templates root and viola! Once I used your suggestion for the URL “/home/_portfolio/projectName” everything worked right as rain.

Thanks again. Cheers.

I had originally thought that about featherlight too, but on the main project repo readme, they have ajax loading instructions and it works like a charm.

1 Like