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.
986
questions
0
votes
1
answer
268
views
Deleted page URLs
We're having a bit of a problem with the unique URL system in Craft. An entry was deleted, and a new one has been created to replace it. However the new entry should have the same URL as the old ...
1
vote
2
answers
325
views
Issue accessing single entry from within category template
I've got a product section on a website where individual product entries are categorised. On the section landing page all the products are listed organised by category. On the individual category ...
2
votes
1
answer
1k
views
Can I select the latest draft of a given entry?
I've built a help site for a client that pre-releases articles to a select group of beta users. The updated articles (Craft entries) are published as drafts until features make it out of beta and into ...
2
votes
2
answers
2k
views
Create a link list with URLs, categories, entries
Sorry if this question has already been asked.
I'm building a website for a client. In their footer they have several list of links, and I want them to be able to change them (so not hardcoded into ...
0
votes
0
answers
70
views
Adding extra data to an element
I know questions similar to this have been asked in the past. But I still don't feel like I am getting a full picture so feel there is benefit in asking it again.
I want to add extra data to a post ...
4
votes
4
answers
4k
views
How to output siblings including the current entry?
I'm trying to output all the siblings of the current entry in a multi level structure like this:
{% for sibling in entry.siblings() %}
<li>{{ sibling.link }}</li>
{% endfor %}
This ...
2
votes
1
answer
215
views
How can you display entries filtered by localisation/localization?
Supposing you have a structure of products but you only want some to be available to certain localities?
I am sure you could add a field to the entries E.g (Available in: eng | fr) and then test the ...
2
votes
1
answer
787
views
How do I query for entries, based on a value inside a table?
I'm trying to query up some entries based on a value inside an editable table.
Here's two pictures on how it's set up:
https://i.stack.imgur.com/UW9yV.png
https://i.stack.imgur.com/P4Gtc.png
My ...
1
vote
1
answer
414
views
Select all entries with asset field attribute criteria
OK so I got entries articles with an asset field documents.
This asset field has an attribute called docType which is a dropdown with 5 values (A, B, C, D, E).
I d like to select all articles ...
2
votes
1
answer
2k
views
Sort / Order Entries on select or button click
I have a page on my website were I display alot of entries. Now I want those entries to be sorted by Date, Title etc. I know how to change that hard coded but I want to make it dynamic with a <...
4
votes
2
answers
2k
views
Is it possible to change a loop if mobile browser is detected?
I have a loop to go through my products which go in batches because they need to show detail info every third entry. When the Website is viewed from a mobile device, Tablet or Mobile I want it to loop ...
12
votes
1
answer
8k
views
How do I sort entries by two variables?
Currently I am sorting the entries by an ID:
{% for gallery in craft.entries.section('Gallery').order('available desc').limit(none) %}
but I would like to show the latest entries on top, currently ...
1
vote
1
answer
325
views
Repeat entries but starting from offset
I have a structure that I am using for a schedule, it has 1 entry per day (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday).
What I want to do is only show the 3 days from the current ...
2
votes
1
answer
413
views
Check saved entry is a brand new entry
I have a plugin using the onBeforeSaveEntry event. Is there a simple way to check if the entry being saved is a brand new entry i.e. Add New Entry or if it currently exists and is just being updated?
3
votes
1
answer
601
views
Get all entries attributed with category
Maybe I'm going mad here, but I can't figure out how to get all entries which are in a certain category.
Following the syntax laid out here: http://buildwithcraft.com/help/entries-related-to-category
...
2
votes
1
answer
132
views
Similar entries with the greatest coincidence tags
I have code
{% set tags = entry.q_tags %}
{% set entries = craft.entries.relatedTo(tags).order('score').find() %}
{% for item in entries %}
{% if item.id != entry.id %}
.......
1
vote
1
answer
580
views
New entries not appearing on template page
My client has been adding some new entries in a channel called Products. These are using different templates that are selected when creating the entry.
The entries on a few different template types ...
8
votes
1
answer
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 ...
1
vote
1
answer
453
views
How do I optimise this colossal query?
This complex query makes the server cpu run at 100%.
{% set entries = craft.entries({
section: sectionParam,
search: searchParam,
relatedTo: relatedToParams,
condition: ...
3
votes
1
answer
815
views
Cannot create entry when Entry Type has Title field hidden
I have created an Entry Type with the "Show the Title field" option not checked.
When creating an entry of this type, I am given a generic "Couldn't save entry" error message.
Looking in craft.log, ...
1
vote
1
answer
1k
views
How to integrate with Hubspot
For a big client we are required to set up their blog on their Hubspot account. However we are developing everything else in Craft.
What is the easiest way to make the connection so the client can ...
2
votes
0
answers
73
views
Return all entry types or entry fields for one entry object [duplicate]
Is there a way to pull out all entry fields for an entry by their handle so they can be looped through?
For example rather than doing each field manually like {{ entry.title }}, {{ entry.description }...
8
votes
1
answer
989
views
How to get entries related to current category only (not children)
I need to get entries which are only in current category, not child categories.
So if I have a category structured like this:
Food
----Fruit
-------Apples
-------Bananas
I've got a categories ...
0
votes
0
answers
323
views
No entries showing: Unknown error has occurred
I have recently uploaded our dev site to the live server so we can populate with correct assets and deploy once complete.
I've set all variables I can think of to reflect the new environment, but for ...
11
votes
1
answer
7k
views
Advanced query/filter based on date and values
I have a channel of events with a field ‘eventDate’ for the date/time of the event. Within that there are ‘types’ of events ‘eventType’. What would be the most efficient way of outputting the NEXT (...
2
votes
2
answers
2k
views
Get current entry category
I haven't used categories before so maybe I'm looking at this the wrong way.
I currently have a category group named products with the following structure:
Featured
Fruit
----Apple
----Banana
Veg
---...
3
votes
1
answer
674
views
Making multiple pages different with the same template
Lets say I have four different pages I set up on a channel to have four different directories. ie ... hello/1, hello/2, hello/3, hello/4. But they are all using the same template.
What could an ...
2
votes
2
answers
417
views
Omitting unused letters from A to Z list
I'm displaying lists of members grouped by their surname initial which the user navigates using a list of letters from A to Z. This part was straightforward enough and the following code works to ...
1
vote
0
answers
157
views
Add entry ids to a session cookie/variable array on button click?
I'm looking for a way to add entry ID's to an array in either a session cookie or a session variable.
I've installed the LJ Cookies plugin (https://github.com/lewisjenkins/craft-lj-cookies) in the ...
3
votes
1
answer
812
views
URI / Slug auto generation limitation
Craft seems to have a limitation when generating unique URI for > 100 entries with the same title.....
I have a channel with YouTube videos in and some are spread across 140 parts all with the same ...
14
votes
1
answer
5k
views
How to duplicate entries
How do I duplicate content within craft?
I created one article, and dont want to copy paste content from one to the other, or use one article as template for the others.
2
votes
1
answer
1k
views
How to move entries from one channel to another
I have a channel that has three different entry types. The client has decided that two of those post types should be in a separate channel. This is an existing site with a few dozen entries currently ...
2
votes
1
answer
66
views
Getting all entries posted on any given weekday
Super simple request, not sure if it's possible...
Can we pull all entries that were posted on a Monday, for example? Or pull all entries but group them by the day name they were posted on?
5
votes
3
answers
3k
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 ...
3
votes
1
answer
163
views
Search entries based on two form values
I have a form that consists of two dropdown boxes. These dropdowns contain values that relate to two sets of categories for one type of entry.
So when the search form is submitted there are two ...
3
votes
1
answer
1k
views
Getting entries related to current entries categories
Trying to get 10 entries related to the current entry categories excluding a category called featured. I don't have the category name(s) in the url.
This currently what I tried but this does not work,...
2
votes
1
answer
596
views
Plugins - Element Criteria Model. Can I return only entries with a updated date in the last 7 days?
My plugin function is ignoring the dateUpdated criteria. Any clue as to why? I'm guessing it's syntax, but I cannot find any examples online as to how to format correctly. I can make this work in a ...
3
votes
1
answer
342
views
List Categories AND their associated entries
I'm trying to create a category driven gallery. My setup (right or wrong) is this:-
Users create a new entry within a Structure, title it, add photos and then assign the entry to a pre-defined ...
0
votes
2
answers
1k
views
Bootstrap 3 Navbar dropdown problem
I have included the navigation using Bootstrap 3 navbar. It is put together using Craft entries. I need the 'What we do' dropdown to be triggered when pressing the text or caret arrow but at the ...
1
vote
1
answer
807
views
Using a field multiple times in a single template
we have a problem over and over again and I wonder if we're missing something.
Using bootstrap we have a matrix field, let's call it Grid, that has blocks like "full column" "half column" etc. It's ...
2
votes
1
answer
78
views
How could I load content from one Craft install into a template of another
We are working on a help guide solution for Craft and our hope is to have all the guide content live in a single master Craft setup and then our client's sites could read and display this content in ...
2
votes
3
answers
3k
views
Display list of countries in form using a dropdown
So I'm using this territories plugin to display a list of countries in a dropdown. The issue I'm having is showing these countries within my front-end entry form.
I've used this example but it doesn'...
1
vote
3
answers
607
views
Is it possible to disable token expiration? Or prevent follow from bots?
So I have some gated content entries and need to prevent these from being indexed by search engines etc. Currently using draft pages but the tokens expire which then causes a 404 if someone is to land ...
2
votes
1
answer
136
views
SET versus FIND
As I understand, I have (at least) the following two possibilities to list entries of a channel:
Possibility 1:
{% for entry in craft.entries.section('example').find() %}
Possibility 2:
{% set ...
5
votes
2
answers
549
views
How to make next/prev links for entries circular/endless
I've got a basic portfolio website which has "prev project" and "next project" buttons on each entry detail page. I'd like for when you reach the last project for the "next project" button to simply ...
1
vote
0
answers
290
views
Is there any way to create reciprocal related entries?
I'm working on a sign language dictionary project. Each individual sign (or word) is an entry.
I want to be able to have an area that shows words that are similar to the word that is being currently ...
2
votes
1
answer
438
views
Archive page - only show posts from certain month
Using this handy thing (http://buildwithcraft.com/help/entry-archive) to create an archive page, but not quite doing what I need it to do.
Set up as a route to call /year/month, replacing year with ...
5
votes
1
answer
969
views
Creating an archive page with full year and month list
Trying to create an archive page for each of my blog types within Craft. The page sorts by year and by month. (year and month are coming from my routes in this code.)
By using the following, I can ...
0
votes
1
answer
611
views
Is there an easy way to loop through all existing values of an entry field and store them in an array?
Looking to loop through and filter based on possible values in a text entry field...I have a text field called storeBanner that has 11 possible values (but could have more). Just need a way to go ...
1
vote
1
answer
152
views
Display all related entries in a table
I'm building a site that contains a listing of products and distributors. I have a channel for each, and each entry in the distributors channel contains a relationship field to tie it to any number of ...