Question

My question is related to stacey 2.3 and Categories

I am trying to figure out how to make next structure work

I have a page (folio) on which I want to display children of folders (categories)

it looks like this:

root/root-folder/1.category/1.page-name

root/root-folder/2.category/3.page-name

root/root-folder/2.category/5.page-name

at the end it should look like this

12.category/1.page-name, next is 4.category/2.page-name, next is 12.category/3.page-name

I have managed to list children of children

get "/root-folder" do
    if $children do
        foreach $children do
            if $children do
                foreach $children do
                    <a href="@url" title="product name"><img src="@thumb" alt="Rileys email design" /></a>
                endforeach
            endif
        endforeach
    endif
end

But now there is a next problem it gets elements from category 1 (4.page-name) and only then from category 2 (1.page-name)

I want them to display in order of page-name

Was it helpful?

Solution

I came up with a solution on how to make categories in stacey.

We will need next structure

Folder with thumbs /article-thumbs/ it will contain .ie 1.articlename, 2.articlename and categories like "web-design/ that is going to duplicate referring articles. As thumbs are small it is not generating any big issues.

Then we have folder with articles-files/ which contains 1.articlename

And we generate for thumbs links ../projects/@slug - connecting thumbs to their open view and this way we can have as many categories as you want.

See example here link for page I've used this method

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top