I'm a complete noob in the Craft world but love to give it a whirl for my latest project - just wondering if it can do what I want it to, and to maybe get some starting points from you guys in the know!

I'm building an Author agency website. In addition to their simple static info pages they will need to administer their 250+ clients (Authors,Public Speakers or both) and the 600+ Books by their clients. These will obviously need to be linked (through Entries as I understand it so far). i.e they want a single Author profile page (headshot, bio etc) which also displays a list that author's books, in turn linking to each book's profile page (synopsis, jacket, purchase link etc).

Now clearly I'll need either Client or Pro, as I imagine I will need to achieve this through Channels? Am I on the right track? Is there anything you think I'm missing (plugins?) Or maybe I pissing up the wrong tree?

Thanks in advance.

1 Answer 1


Don't be alarmed if this post gets flagged for being off-topic. Typically questions regarding whether "craft is appropriate for x" are considered too broad and opinion based. But I'll try and give you some suggestions anyway, which may give you a head start.

The short answer is yes, craft can do all those things. The only point to maybe consider is when you say "purchase", unless you are just linking to amazon or something. As I'm sure you're aware, E-commerce is not something to take lightly and I would make sure you research your options here, and have a plan. E-commerce solutions for craft are limited at the moment, but keep an eye on the plugin page.

You will likely want to have Craft Pro, so that you can have multiple user accounts.

Here is one approach to the basic CMS design, without really knowing anything about your requirements.

  • Create a single for your homepage.
  • Create a 'structure' (call it "pages" for example, or whatever you like) to contain all of your static pages and index/landing pages. This would include for example pages like "About us", "Company", "Services", "Authors" index page, "Books" index page, and anything else that you would consider as part of your main nav. 'Entries' within this structure would be defined with unique 'Entry Types' for each unique page layout that you need. Within each 'Entry Type' fields can be defined independently from other 'Entry Types'. In the 'pages/_entry.html' template you can determine which template code to display by checking the entry.type property. The advantage of using a structure here (as apposed to channels and singles) is that you can use it to generate dynamic navigation. See example below.
  • Create a channel for Authors (called 'authors' or whatever). You can also create users for this if you ever want to allow clients to log-in for whatever reason. (Note: I would use a channel regardless because it allows for multiple tabs in the edit page, and link it to users via a users field. But that's just me). Another tip: Might also check out a plugin called Introvert to display reverse related books from the books channel.
  • Create a channel for Books (called 'books' or 'products' or whatever), with a 'related users' or 'related entries' field for 'authors' (depending on how you dealt with authors above).
  • Create a category group for your books subject taxonomies (I'm just guessing at this point), but you get the idea.
  • Add salt and pepper to taste and serve.

Now for some code examples (and useful concepts regardless of your design).

In your '_layout.html' master template, to generate nav (copied from the docs):

{% set entries = craft.entries.section('pages') %}
<ul id="nav">
    {% nav entry in entries %}
            <a href="{{ entry.url }}">{{ entry.title }}</a>
            {% ifchildren %}
                    {% children %}
            {% endifchildren %}
    {% endnav %}

In your 'pages/_entry.html' template, to determine the entry type and retrieve related entries:

{% switch entry.type %}
    {% case 'about' %}
        {{ entry.title }}
    {% case 'authors' %}
        {{ entry.title }}
            {% set authors = craft.entries.section('authors') %}
            {% for author in authors %}
                <li><a href="{{ author.url }}"></a>{{ author.firstName }} {{ author.lastName }}</li>
            {% endfor %}
    {% case 'books' %}
        {# repeat code above but for books, likely with some category break-down based on the categories field #}
    {% case default %}
        {# display default template #}
{% endswitch %}

Note: You can also use 'includes' in the switch statement, for better template organization, or use this technique to eliminate the need for the 'switch' statement altogether.

In your 'authors/_entry.html' template, to get related books.

<h1>{{ entry.title }}</h1>
   <img src="{{ entry.headshot.first.url }}" />
   {{ entry.bio }}
    {% set books = craft.entries.section('books').relatedTo(entry) %}
    {% for book in books %}
            {{ book.title }}<br>
            <img src="{{ book.coverPhoto.first.url }}" />
    {% endfor %}

In your 'books/_entry.html' template, to get authors from the 'authors' entries field.

<h1>{{ entry.title }}</h1>
<img src="{{ entry.coverPhoto.first.url }}" />
    {% for author in entry.authors %}
        <li>{{ author.title }}</li>
    {% endfor %}
  • Thank you so much Douglas, you've gone beyond the call of duty with your answer. It's really helped me a lot in my decision for using Craft. I'm beginning to dabble and so far so good! Feb 2, 2015 at 22:22
  • Welcome to the Craft CMS Stack Exchange, @Dr_Codswallop! Please consider accepting the answer Douglas provided if you found it helpful.
    – Matt Stein
    May 10, 2017 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.