Designer News
Where the design community meets.
over 9 years ago from Jess Eddy, Product Designer / Hacker
Twig has a little bit of a learning curve but that's only because of how much functionality and control you have. With other templating languages there really isn't a learning curve, but you look at the amount of control you have and its saddening.
Take a peek over at http://twig.sensiolabs.org/
Just a super quick example showing how to loop through entries from lets say the "Blog" section.
{% paginate craft.entries.section('blog') as entries %} // Check if there are any entries {% if entries|length %} {{ entry.title }} {% else %} // No entries <p>No entries SUCKA!</p> {% endif %} {% endpaginate %}
What's really awesome about Twig is there is no Parse Order, so if I wanted to have an partial of what a specific type of blog article looks like, it super simple with no needing to figure out of the right data will be in the included partial.
{% paginate craft.entries.section('blog') as entries %} // Check if there are any entries {% if entries|length %} {% if entry.type == "photoarticle" %} {% include "_partials/photoarticle.html" %} {% else %} {% include "_partials/regular-blog.html" %} {% endif %} {% else %} // No entries <p>No entries SUCKA!</p> {% endif %} {% endpaginate %}
I definitely need to research it more. Didn't realize is was $300. Might be a lot for me, being in college and all.
I guess I can use the free version until I get bigger clients.
The $199 Client version will work for you in almost cases: the Pro really is everything but the kitchen sink. But honestly, does the cost matter that much? I mean, it's a line item expense to the client; you're not paying it out of pocket.
If your client is not expecting charges in addition to your actual production work, you're not setting expectations right. You'll need to acquire photographs (stock or custom?), maybe hire an illustrator or copywriter, purchase a web license for a font, certainly software costs are factored in... You can't be expected to do good work with shitty inputs ("garbage in, garbage out").
Put another way: if $300 is too high a license fee for your clients to pay, you need better clients. That's what, 3 billable hours? Just add the time to your production estimate.
Yeah I don't think 300 is a big price when working with clients. Right not I am in the beginning phases, where I am doing personal projects, and a site for my church. So $300 for me now looks like a lot, but I think in the future, if I do a lot more of this, it wouldn't be a big deal.
In general, yes -- that's the best practice. If you're going to implement a photo gallery, let's say, then you'd do a few of them as static entries with asset, title, caption, date, etc. Mark it up straight. Then, replace all of them with the template code that generates each entry which, of course, will be different for each CMS. But that's the gist.
Designer News
Where the design community meets.
Designer News is a large, global community of people working or interested in design and technology.
Have feedback?
If been really struggling with the question of which CMS to use, and when to even use a CMS.
Does Craft have a steep learning curve? I am more a designer, but I still learn code to make my sites. Would it be a good thing to learn. I did an Ask DN and I was told best practice is to write everything static and then implement the CMS. Would this be how I would do in in Craft?