23

Have you switched sorting to "Structure"? When you're not sorting by Structure, you won't be able to rearrange the entries.


11

There's a lot here but I'd start by create 2 different channel sections: Blog and News. From the front end, that makes it easy to see which entries are associated with what sections and easy to post content into each one. It also makes it easy to filter in your templates what section you're after. To get your entry URLs setup, it's a little tricker but ...


8

You can retrieve the entry by grabbing it from the URL as a variable: {% set entrySlug = craft.request.lastSegment %} And then using craft.entries to find the matching content: {% set entry = craft.entries.slug(entrySlug).find() %} Alternatively when you set up your route, so that Craft knows which template to load when someone is requesting your entry, ...


7

You basically have two options for creating a "listing" or "archive" view for your Channel or Structure sections. The first option is to create a Single. This is in many cases appropriate, e.g. if you need to add content to the listing view in addition to the actual entry list, such as a visual banner, introductory text etc. Inside the Single section's ...


6

There is probably no best answer. There are a number of ways to structure craft to support this, and any answer is going to be highly subjective. A lot will depend on the relationships between the elements, and what the requirements of the different elements are (i.e. how complex, etc). One option to get the desired uri pattern (i.e. /sermons/series-name/...


6

The without filter converts your ElementCriteriaModel into an array of entry models (the same as find() does). But that array won't work with paginate, as explained in the docs: This parameter needs to be an actual ElementCriteriaModel object; not an array of elements. So don’t call find() on the object. So you need to query for the entries you're after ...


6

Alan describes how to setup a route via the Settings->Routes area in the CP. If you happen to be managing file based routes you can setup a similar route like so: return array( // Your Custom Section 'username/blog/(?P<slug>.*)' => 'blog/_entry' ); The third segment in your route (?P<slug>.*) creates the variable that will ...


6

Set a limit of nulll on your entry query which means no limit. If you do not specify a limit, you will only see 100 entries. .limit(null)


5

.getPrev and .getNext sounds like what you're asking for: http://buildwithcraft.com/docs/templating/entrymodel#isSiblingOf {% set params = { section: 'cocktails', order: 'title' } %} {% set prevCocktail = entry.getPrev(params) %} {% set nextCocktail = entry.getNext(params) %} {% if prevCocktail %} <p>Previous: <a href="{{ ...


5

Are there more than 100 entries in the products channel? If so, you'll need to specify the limit. All Craft requests are limited to 100 by default. {% for entry in craft.entries.products.limit(null) %} If not, please post your template code :)


5

Unless I'm misunderstanding, it should be as simple as: {{ entry.section.name }}


4

A Channel called Blog as follows: Entry URL Format: blog/{slug} Entry Template: blog/_entry In blog/_entry.html: {% extends "_layout" %} {% set title = "{{ entry.title }}" %} {% block content %} <article> <h2><a href="{{ entry.url }}">{{ entry.title }}</a></h2> {{ entry.body }} <p>Written by ...


4

As suggested by Lyndsey D, use the LJ Dynamic Fields plugin with the following Twig code to create your dynamic dropdown menu. It appears that Craft doesn't have a built-in way for an entry to self-reference itself as you'd like, but we can use Twig's built in filters to get around this by getting the id directly from the URL. {% set thisEntry = craft....


4

Ok, just spitballing here, but this is where my brain is going... Channel: Restaurants Each restaurant is a unique entity, correct? So they wouldn't need to be in any specific order, nor nested. (Chain restaurants could be related by other means.) All of your broad restaurant-based fields would be here, including location, phone number, hours of operation, ...


4

The probably more elegant way to handle this is to not use the without filter at all and simply list the categories you want to exclude prefixed with not. {% set categories = craft.categories({ group: 'location', slug: [ 'and', 'not berlin', 'not amsterdam', ], limit: null, }) %} {% set entries = craft.entries....


4

There is a light switch field in your section settings with the label "propagate entries across all sites". Just turn it off and your entries will be unique


3

It's not just Windows / Linux / OSX that have different file system case sensitivities, but even different distributions of Linux can have them. Or the same distribution, but with different file systems. Or the same distribution and same file system, but one has been configured to be case sensitive and the case insensitive. Instead of accounting for all ...


3

Currently there isn't any core functionality in Craft for duplicating/moving entries between sections. I think this has been brought up a few times before, but I'd recommend heading over to Craft Feedback and posting up about it there! Anyways, back to your question. I did post something similar to this at the end of last year. I haven't used this ...


3

If you are using a Structure to manage your site hierarchy, and the news index page naturally falls in that hierarchy, then yes, this can work well. Make an entry type for the index page, and in your template (which is the same for all the entry types), {% include ['_page/'~entry.type, '_page/_default'] %} (So if you haven't defined a template for this ...


3

Not every website has a 'blog' section. If your site's other content would, for instance, be something completely different like general company info, it would make perfect sense to have a news section. In case you do have a blog, it would be perfectly possible to delete the 'news' section and give the blog section an entry type called 'news'. That way you ...


3

It turned out that when I deleted news/ from the entry URL format, I also deleted it from the entry template path as well because I misunderstood what that field was for (and forgot to revert that change when everything broke). Thanks to @Brad for drawing my attention to it.


3

Depends on your definition of "easy". :) Probably the easiest way would be to do what you describe and import the full database. From there, you can write SQL to find all of the entries that you don't want to keep around from the craft_entries table. If you get the IDs for those, you can remove the equivalent rows from the craft_elements, and Craft's ...


3

Create a single section that displays the channel entries so that I can link to it? Are you trying to select the actual Channel itself? (like the News / Blog). Trevor Davis' handy Listing Section fieldtype could work here. If you want more control as to what is shown on that channle's "index" page (intro blurb, featured entries, etc), as you mentioned, ...


3

You could try something like following reducing the tagged entries into IDs that you then filter against (see this thread): {% set tag = craft.tags.search('All-Stars').first() %} {% set allEntries = craft.entries.section('news') %} {% set taggedEntries = craft.entries.section('news').relatedTo(tag).ids %} {% set omitIds = 'and, not ' ~ taggedEntries|join(', ...


3

You can use the Twig slice filter do do this, e.g.: entry.text |slice(0, 100) If you want something that looks a little nicer, and you're using the SEOmatic plugin, you can use the truncateStringOnWord filter, which will truncate to the number of characters you want, but only on word breaks (and it'll add an …).


2

Grab all of the entry IDs you want from the craft_entries table, then find the rows matching those IDs in the craft_elements table and set their enabled column to 0 to disable them en masse.


2

There is no predefined 'index' page for channels. Channels are simply a collection of entries. If you want an index page then you will need to create it: either as a single, as an entry within another structure, or as a stand alone template in your templates directory (i.e. craft/templates/news/index.html or craft/templates/news.html). In any case, the url (...


2

I'd recommend to either give each channel's index page a dedicated single section or you configure a structure section to contain them all. An advantage of using a structure over separate singles is that you can generate the site's main navigation from it. And you can add a hierarchy to it. The structure settings in the CP: URL for Top-Level Entries: {slug}...


2

The reason why there's no automatically set url and template for channel index pages is because Craft tries to be as flexible as possible. In many use cases for channel sections you don't want a index page at all or you could also need multiple of them. But you already chose a very solid approach by setting up a structure section for your navigation. And no,...


2

I think your answer is in the post you referenced. Create two entry types in a single section, each of which contains different fields (and/or some in common). Then loop through all the entries and test for entry type in the output. {% set entries = craft.entries.section('blog').find() %} {% for entry in entries %} {% if entry.type == 'linklist' %} ...


Only top voted, non community-wiki answers of a minimum length are eligible