Questions tagged [entries]

Entries hold the content that you want to display on your web pages. Each entry has an Author, a Post Date, an Expiration Date (if desired), a status (enabled or disabled), and, of course, content.

Filter by
Sorted by
Tagged with
9
votes
5answers
2k views

Is there a way to delete all entries in a section?

I've ended up with loads of duplicate entries after a botched import job. Is there an easy and safe way to delete all entries in a section, so that I can start over again?
2
votes
1answer
1k views

Is there a way to remove or filter out duplicate entries?

I have imported some data for a client, and it turns out there are some duplicates in the csv-files. Is there an easy way to remove or filter out duplicates, either in my entries-query or in my ...
1
vote
2answers
342 views

Unable to set slug to value used previously

I have an entry whose slug I would like to set to 'archive', but when I save it, it is 'archive-1'. There is no existing entry with slug of 'archive' (craft.entries.slug('archive') returns null). ...
8
votes
2answers
4k views

Frontend upload for images, mp3s and video?

I would like to allow users of our site to be able to upload images, mp3's and video from the front-end. Can I do this with the entry form template easily enough? I was thinking maybe I could use ...
3
votes
1answer
810 views

Ordering of ElementCriteriaModel with varying statuses

I have a built a little plugin that calls the Twitter API to add new Tweets from a user timeline as entries, so that I can return them in an ElementCriteriaModel request to be integrated with content ...
7
votes
2answers
4k views

Do I need a plugin to load entries via AJAX?

I want to load some entries via AJAX. I have a page that normally shows all entries of a specific type with user-selectable filters. I want to load filtered entries via AJAX. Do I need to create a ...
8
votes
1answer
4k views

Ordering Entries without using entry date

Looking to explore solutions for ordering entries in a channel. My current ideas are: For example purposes let's say this is for recipes and the client wants to be able to pick the order of recipes ...
6
votes
1answer
377 views

Return entry where matrix field is not empty

I am trying to get a random entry which has the quote matrix field populated. I've tried this: {% set entry = craft.entries.section('entries').quote(':notempty:').order('RAND()').limit(1) %} That ...
6
votes
3answers
2k views

How can I display the related posts (by category) at the bottom of each post?

I'm converting a WordPress blog to Craft - first time playing with categories in Craft, so how can I display the related posts (by category) at the bottom of each post?
5
votes
1answer
2k views

How do I use an if/else statement to determine if a field is filled in?

I know how to add images into my template: {% set image = entry.featureImage.first() %} <div class="imagewrapper"> <img src="{{ image.getUrl() }}" width="{{ image.getWidth('banner') }}" ...
8
votes
1answer
4k views

Return entries where field is “not empty”

I'm trying to return entries where a specific field named "productSale" is not empty. Unfortunately, my code attempts keep throwing the "Expected name or number" error. Code attempts include: {% set ...
7
votes
3answers
615 views

Can I extend entries listing views (currently or in the future)?

Is there a way to show custom columns in the backend with entries listing views? Or can it be a feature in the future? For example: show category as a column in the news overview in the backend
4
votes
1answer
2k views

Listing categories alphabetically & total post count

How do I list all categories in use alphabetically? And how to get the total post count from each category? Cheers
4
votes
1answer
3k views

How to loop through category group and identify those related to entry

Looping through a category group to show links to all the categories. This is an entry page and I want to highlight any categories assigned to the entry. How do I do that? I've tried this so far: {% ...
16
votes
4answers
46k views

How do I target the first item in a Twig for loop?

I'm looping through some images and want to target just the first image. How do I do that? {% for image in entry.images %} <img src="{{ image.url }}" alt="{{ image.title }}"> {% endfor %}
12
votes
3answers
4k views

Get an entry's last modified date

Trying to determine if there is a method for getting an entry's last modified date, preferably date-time. Gave a good look over the docs and some searching and couldn't find anything other than the ...
12
votes
2answers
1k views

What are the differences between an elementCriteriaModel and fetched elements?

I am a little confused about the differences between an elementCriteriaModel and fetched elements. Why do I sometimes have to fetch elements with first(), last(), find(): {% set entries = craft....
17
votes
1answer
1k views

How to show events for “This Weekend, Next Week”

Stemming from this original post I was able to show Events using a custom date field and successfully got "Today" and "Tomorrow" events to show up. How would I go about doing some custom Math to show ...
7
votes
1answer
433 views

How Do I show advanced Date filters for Events?

I am trying to setup an events section similar to that of Yelp's Events. They have a listing of all the upcoming events and have filters on the side for "Today, Tomorrow" etc... I received help from ...
5
votes
3answers
2k views

How would I list all entries regardless of section or structure?

I'm trying to build and XML site map that sorts all entries by their modification dates with the newly modified first. {% for entry in craft.entries.find() %} ignores the structures, {% for entry ...
5
votes
1answer
183 views

How do I add Entry Types to URL?

In the Sections settings ("Entry URL Format") I would like to add an entry property tag for Entry Type. discography/{slug}
5
votes
2answers
952 views

Tag to fetch URL and Title of a entry when supplied it's ID

I have a number of places in my templates where a link to a particular entry is needed to be hardcoded into the template, but we still want that links URL and title to be dynamic, so if the URL or ...
9
votes
2answers
424 views

How would I allow guests to add comments and ratings to existent entries?

I have a page with a bunch of images that I'd like people to rate and comment on. The rating would be a select custom field, and the comment would be a simple textarea custom field. I'd like to ...
5
votes
2answers
1k views

Creating a date filtered archive template

I'm trying to create an archive list template that lists entries from a News or Blog Channel based on year/month/day combinations. However, I get no entries and can't see where I'm going wrong...I'm ...
37
votes
5answers
11k views

How can I retrieve channel data in json format?

I've played around with a few implementations but I still don't feel like either is right. I first came across building the JSON itself. This would be in a file at "craft/templates/entries.json". [ ...

1
15 16 17 18
19