How to setup Use Kirby for a very large photography magazine

Hi,
I’m helping a friend redesign an online photography magazine, that is currently done in Worpdress.
I’m trying to understand if I can use Kirby because is more easy to manage for me as I’m a designer not a developer.

The magazine is out every 3 months, and has a very simple structure based on issues.
Each issue has a collections of photography projects and each project contains pictures and a statement, so that the final structure is more or less something like this:

  • Issue #25

    • AuthorA - Title of the project 1
      image001.jpg
      image002.jpg

      imageXXX.jpg
      statement.txt
    • AuthorB - Title of the project 2
      image001.jpg
      image002.jpg

      imageXXX.jpg
      statement.txt
  • Issue #24

    • AuthorC - Title of the project 1
      image001.jpg
      image002.jpg

      imageXXX.jpg
      statement.txt
    • AuthorA - Title of the project 2
      image001.jpg
      image002.jpg

      imageXXX.jpg
      statement.txt

First question: is it possibile to get create this structure with Kirby?
Is not also clear to me if is possibile to relate content with Kirby: in the example above I put Author A in two issue.

Second question: is it possibile to create an index page that show automagically something like:

  • A
  • Author A, ([24](link to issue 24), [25](link to issue 25))
  • Author B, ([25](link to issue 25))
  • Author C, ([25](link to issue 25))

So that the page shows all the author that have been published in the magazine and the related issue.

Other doubts on using Kirby for this project:

  • the magazine has a very large number of content. Consider that currently we have 25 issues, about 50 author/project per issue with an average of 20 pictures per project (so more or less 25x50x20=10000 pictures);
  • I’d like to upload for oeach project only the maximum size for each image; can Kirby generate all the images/thumbnails for the responsive template that I’d like to use?

Any suggestions are appreciated!

Thanks,
Fabio

As regards the structure, that is no problem at all with Kirby, so that is both a yes for your first and second questions. Instead of having a flat issue structure, it might make sense to put the issues into year folders, as the Panel will slow down if the number of subpages becomes too big. With currently 25 issues, that is no problem, but it might be in the future.

You can either create your authors as (Panel) users or set a separate page with subpages for each user, which you can then link to each project. Of course, you can also use other relations like categories, tags etc.

As regards the content, big sites like that have been built with Kirby, e.g. http://nimbus-lighting.com/, built by @bastianallgeier himself. You might like to check out this post on performance.

Kirby has a thumbs class for generating responsive images in your templates. There’s also a commercial plugin available which can generate thumbs on the fly.

If you use the search function in this forum with keyword “performance” you will find more post on that issue.

Hi texnixe,
thanks for your suggestions. I didn’t thought about adding a Year level. That will keep everything more easy as I can have just 4 issue per year.

So the final structure could be something like:

  • 2017
  • Issue 24
  • Issue 23
  • Issue 22
  • Issue 21
  • 2016
  • Issue 20
    • Author A - Project
    • Author B - Project

and so on.

Unfortunately I did’t get the point on how to get Author as a panel. Do you mean something like the following, even if each Author have just 1 project per issue?

  • Issue 20
  • Author A
    • Project
  • Author B
    • Project
  • Issue 21
  • Author A
    • Project
  • Author C
    • Project

No, you don’t need the author as subfolders. I meant, you can either create the authors as users in the Panel or you could set up a separate page “authors” with the author names as subfolders. Then in each project, you can have a select field for the author. You structure would like you suggested

  • 2016
    • Issue 20
      • Author A - Project
      • Author B - Project

Only you don’t necessarily have to add the author in the project name if you don’t want to, and you can filter by author or create your index page from this information.

Hi @texnixe, thanks for your prompt reply.
In this case, authors are not people that can access the site: they are photographers that can submit their work to the editorial staff that will publish the work. I prefer to keep them as not kirby users, for security reasons.

In Kirby, you can add users without Panel access. But as I said, that’s just one possibility. If you don’t need the authors for any other purposes, you can just add a field in each project, where you add the author.

Hi texnixe,
I’m trying to setup the magazine in this way:

content/
    1-archive/
        archive.txt
        2016/
            year.txt
                24-issue/
                    issue.txt
                    1-name-project/
                        project.txt
                        001.jpg
                        002.jpg
                        ...
                25-issue/
                    issue.txt
                    1-name-project/
                        project.txt
                        001.jpg
                        002.jpg
                        ...
        2015/
            year.txt
                22-issue/
                    issue.txt
                    1-name-project/
                        project.txt
                        001.jpg
                        ...
                23-issue/
                    issue.txt
                    1-name-project/
                        project.txt
                        002.jpg
                        ...

I’m creating the templates for: archive, year, issue and project. I’m reading the subpage documentations but I can’t understand how to get the archive working.
It is mandatory to create also a year.yml blueprint? I don’t need the form in the panel, but I create the structure in order to get ready for the archive.
I’m looking for a sample template similar to the one I’d like to build in order to understand how it works, but I cannot find it :frowning:

No, you don’t necessarily need a year.yml blueprint. If your text file is called year.txt and the corresponding blueprint does not exist, Kirby falls back to the default.yml file, which should be alright for such a container page. Although it might be useful to set some subpage setting, e.g. the allowed templates/blueprints.

What exactly is your problem with the archive page? There shouldn’t be any specific about that?

SOLVED:
<?php foreach(page('archive')->children()->children()->visible()->sortBy('sort', 'desc') as $year): ?>

Hi @texnixe,
I’ve got the archive page :slight_smile:

Apart the style that is broken, how can I get the page ordered from the latest to the newest? (25 -> 1)

This is the snippet:

<ul class="teaser cf">
  <?php foreach(page('archive')->children()->children()->visible() as $year): ?>
  <li>
    <h3><a href="<?php echo $year->url() ?>">#<?php echo $year->number()->html() ?> <?php echo $year->title()->html() ?></a></h3>
    <?php if($image = $year->images()->sortBy('sort', 'asc')->first()): ?>
    <a href="<?php echo $year->url() ?>">
      <img src="<?php echo $image->url() ?>" alt="<?php echo $year->title()->html() ?>" >
    </a>
    <?php endif ?>
  </li>
  <?php endforeach ?>
</ul>

As you can understand I’m starting from the starterkit projects.php :slight_smile:

You should be able to reverse the order of the issues with the flip() method:

<ul class="teaser cf">
  <?php foreach(page('archive')->grandChildren()->visible()->flip() as $year): ?>
  <li>
    <h3><a href="<?php echo $year->url() ?>">#<?php echo $year->number()->html() ?> <?php echo $year->title()->html() ?></a></h3>
    <?php if($image = $year->images()->sortBy('sort', 'asc')->first()): ?>
    <a href="<?php echo $year->url() ?>">
      <img src="<?php echo $image->url() ?>" alt="<?php echo $year->title()->html() ?>" >
    </a>
    <?php endif ?>
  </li>
  <?php endforeach ?>
</ul>

Note that I changed children()->children() to grandChildren() to make the code a bit shorter.

Hi @texnixe,
just to tell you that in half day, I setup kirbyCMS in order to migrate the magazine :wink:
I spent 3 days last week in order to do the same thing in wordpress and no way to do what I want.
I’m falling in love with Kirby :slight_smile:

Thanks for your suggestions.

3 Likes

Hi @fabiosirna,

thanks a lot for your feedback :slight_smile:, happy to hear that you like Kirby so much! Don’t hesitate to ask if you ever get stuck.

A post was split to a new topic: Is there a newsletter plugin for Kirby?