Questions tagged [entry]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
13
votes
1answer
10k views

Get the current section handle

I can't help but think this is a silly/obvious question, but I'm trying to retrieve the current section handle so I can use it as a class. Maybe I'm going about it wrong, but {{ handle }} does ...
10
votes
1answer
2k views

How do you delete assets from a frontend form?

I am creating a proof of concept for a client in Craft where the client's customers can manage projects from the frontend of a Craft install. I have a frontend form working correctly for creating a ...
9
votes
1answer
2k views

Exclude multiple entries by their IDs

I have a structure people that I need to grab entries from. However, I need to exclude certain entries as some are already displayed on the page in a different manner. I know that you can exclude a ...
8
votes
2answers
4k views

Detecting if page is a 'category' or 'entry'

Is there another way of detecting if a page is an 'entry' or a 'category' than the following? Maybe some global variable that I do not know of? {% if entry is defined %} <!-- Code here --> {% ...
7
votes
2answers
636 views

Get entry index - structure not channel

I want to display the current entry's index - like in this post Get entry index. However my entries are in a structure section type not a channel, so they are not ordered by date. Is is possible to ...
7
votes
1answer
2k views

How do you delete entries from a frontend form?

Part 2 of a 3 part question: I am creating a proof of concept for a client in Craft where the client's customers can manage projects from the frontend of a Craft install. I have a frontend form ...
6
votes
1answer
9k views

Display entry post date

How do I display my entry post date, formated as "May 24, 2015"? I know this is a very basic question, but I can never find these easy answers in either the Craft or Twig documentation.
6
votes
2answers
3k views

Does anyone have a working example of frontend form with multiple file upload, drag & drop etc?

I'm trying to create a frontend entry form for a logged in user, with a field to upload multiple assets to that entry. I've tried using the Jquery FileUpload plugin, but can't seem to get that ...
6
votes
3answers
3k views

Programmatically update entry field

I'm trying to update an entry's field value from a Craft plugin. First I was trying to just update the attributes of the entry like so: $entry->getContent()->setAttributes(array( 'metaStatus' ...
6
votes
1answer
2k views

id: 'not' with variable

i think the following code shows the problem: {% for entry in craft.entries({ section: 'news', limit: 2, **id: not this_id** }) %} the big one doesn't work in this way. Has anyone an idea? The ...
6
votes
1answer
2k views

Get dropdown / checkbox / multiselect field values on frontend submit

I would like to allow registered users to submit entries to sections. The documentation didn't mention how to get the values and labels of dropdown / checkbox / multiselect fields to show them as ...
6
votes
1answer
1k views

Schedule a draft to auto publish?

Is there a way to schedule a draft of a entry to go live?
6
votes
1answer
404 views

How many entries could the Craft database hold before it slows down?

I'm pulling in some RSS feeds using Feed Me (https://github.com/engram-design/FeedMe) and turning those in entries automatically using a cron job. You can imagine that producing a lot of entries over ...
6
votes
2answers
832 views

Comparing 2 versions of an entry and highlighting the changes

I'm new to Craft and I'm wondering if Craft is able to display the differences within an entry in different versions. Comparing 2 versions of the entry and highlighting the changes. Something ...
6
votes
1answer
312 views

Is it possible to use the assets modal on the front end?

Part 3 of a 3 part question: I am creating a proof of concept for a client in Craft where the client's customers can manage projects from the frontend of a Craft install. A missing piece to the ...
5
votes
3answers
1k views

How do I get Matrix elements to copy their content across language Locales?

I returned to a site designed months ago, and added a second language to it. From the beginning, this site had prominent composition of entries out of multiple elements in their matrix, with ...
5
votes
1answer
306 views

How do I allow a user to remove an uploaded asset from a front-end entry form?

I see for users, I can add a hidden field <input type="hidden" name="deleteUserPhoto" value="1" /> to remove the uploaded photo, however I need to allow this functionality for an assets field in ...
5
votes
1answer
707 views

How to add year and month to Entry URL Format

I'd like to make the Entry URL format of a channel look like this: /news/2015/06/my-slug-here What would I need to enter into the Entry URL Format field in order to do this? The closest I could ...
5
votes
1answer
2k views

Plugin Controller - Save Entry

I'm testing with the Foxycart Plugin to update the stock in my code. In the FoxyCartController.php I'm able to filter through the XML feed ok and get the new Stock value but it's doesn't seem to be ...
5
votes
2answers
1k views

Restricting access to fields based on user group

I saw this thread Check user is in User Group / Custom User Permissions had an idea. Can I use USER group to limit who can see the Author dropdown on the entries form? Is this even permitted the craft ...
5
votes
1answer
914 views

Save matrix block to new entry in plugin

I have been trying two separate methods to accomplish and both keep resulting in the same errors no matter what I try. The entry I am saving has a few fields the last of which is a matrix block (I am ...
4
votes
2answers
5k views

Determine Entry based on URL Parameters?

I have a bit of code that checks if a page's title has been manually set in a parent template, and if it has to use that, otherwise to use entry.title. This is what that bit looks like: {% set ...
4
votes
1answer
416 views

Entry Form - Multiple Entries & Entry Type & Parent

I'm building an MVP for a project, I'm using Craft and would like to: Create an experiment (/experiments/) Create multiple cages for the animals within the previous created experiment eg. 5 cages - (/...
4
votes
1answer
1k views

Get next entry based on entry type

As an extension of this question How to link to previous/next entries in a section? If my page is set to automatically provide a entry var in my template. And I can simply access a field like this ...
4
votes
2answers
673 views

Can an entry have multiple authors?

I'm trying to create a multi user blog, where multiple authors can edit the same entry. Is this possible with Craft CMS? Is there a way to assign multiple authors to an entry? I only managed to assign ...
4
votes
1answer
493 views

Use global values in the Entry URL Format field

I'm trying to use global variables in Entry URLs generated by Craft, but they seem to be empty. Not getting any errors as such, just null. My Entry URL format looks like this: {{siteDefaults....
4
votes
1answer
531 views

Set Structure Parent when creating Entry in Plugin

I have Structure-type Section for entries and want to pragmatically populate a large list of multi-tiered entries. I see you can create an entry like: $entry = new EntryModel(); $entry->...
4
votes
2answers
607 views

Counter for entries to show most read Articles

How can I add a counter or something similar to my entries, so that I could loop through the most read articles?
4
votes
1answer
744 views

How to track entry visit?

how do I able to track the visit number of entry? Something like track view in Expression Engine. I have try to find but don't have any source.
4
votes
1answer
148 views

Limit a field to entries by entry type

Is it possible to have an "entries" field but only allow selection to entries of a specific "entry type" within craft? I'm trying to use entry types as a sort of way to enable interfaces with chunks ...
4
votes
1answer
568 views

How to list all existing values for a field across site

I have a huge set of entries which have a lot of fields. Say, the entry type is a 'book' and fields are 'keywords', 'year', 'authors', etc. Now I'm building a filter form which would allow user to ...
4
votes
1answer
624 views

Save multiple locale data via plugin

I'm trying to import data from another database using locales, but am having trouble saving the other locale after the primary locale is saved. foreach($row as $data) { $entry = new EntryModel();...
4
votes
2answers
547 views

Multiple URL's for news entry?

For news entries I want both URL's www.example.com/news/678 (where 678 stands for the entry id) and www.example.com/news/some-slug to load the same entry. www.example.com/news/some-slug works fine ...
3
votes
1answer
422 views

Get draft content in front end form

I have a live entry with an 'eventTime' text field having the content '2pm'. I also have an unpublished draft saved for that same entry with the 'eventTime' field having the content '3pm'. I use the ...
3
votes
2answers
759 views

Creating Drafts from Frontend Entry Form

A two part question here. When saving an entry from front-end entry form, can I designate it to save as a draft? If so, how? If the answer to #1 is true, can I query against that to list only entries ...
3
votes
1answer
1k views

How do I get just the first entry with a 'for' loop?

I have this this code - {% for entry in craft.entries.section('news').first() %} <div class="container" id="featured-news"> <div class=col-md-6> <h2 class="news-...
3
votes
2answers
361 views

How to check if entry field value is already outputted, and prevent it again?

For an event page I have the option to filter on cities and countries. Each event has entry fields in which the city and country, of which the values are outputted in a drop down list on the front end....
3
votes
1answer
1k views

Is it possible to add an entry value to the entry URL Format?

I try to compose an entry URL for artists pages with first name and last name. Now: artists/{slug} = artists/{{ entry.title }} {slug} = {{ entry.title }} = Artist Last Name What I want to add at ...
3
votes
1answer
156 views

How do you pull a entry field in a global out in a template

I am trying to create an easy way to make a sticky post on my blog and I am using an entry field within a global. Not sure where to even start to pull this out in a template.
3
votes
1answer
28 views

Output values from all entries in a specific section EXCEPT those with a specific category id

Currently, this is NEARLY doing what I want except instead of the output being entries that do NOT have the id, it's output is ONLY the entries with the id. I'm not sure why, since I've included the '...
3
votes
1answer
955 views

How to display an entry on frontend with status disabled if admin is logged in?

Something like this? {% if craft.session.isLoggedIn %} {% set slug = craft.request.lastSegment %} {% set entry = craft.entries.slug(slug).status(null).first %} {% endif %} {{ entry.title }} ...
3
votes
2answers
823 views

How can I stop a duplicate entry being created & provide feedback?

I have a booking form on my site, which when submitted creates a new entry which has two fields: an Entries field which links to a single User, and another Entries field which links to a single Event. ...
3
votes
1answer
602 views

How can I get the requested entry from a plugin?

If I’m accessing an entry’s URL (the 4th check in Routing), how can I get the entry that the URL matched from a plugin?
3
votes
2answers
106 views

How to show variations of a single entry? Even possible?

We are building a Commercial Real Estate site for a fairly large commercial real estate company and we're coming from an older custom-built site and there is a work flow and associated data logic we'...
3
votes
1answer
348 views

Load correct language Ajax

I'm having a problem with my ajax-loading when I'm on the english version of my page (My main language is Norwegian). I have a file named loadmore.html that I'm loading in on index.html when pressing ...
3
votes
1answer
176 views

Can a User Group Create Drafts of New Entries Only?

I'm trying to set up a workflow where I have a group of "Drafters" who can create new entries but the new entry is not published by default. I've made the following setting for this group. However, ...
3
votes
1answer
197 views

Pre populated New Entry

Is there a way to pre-populate the 'New Entry' form in the back end? The context here is a calendar where you can click on a day and see a list of events and have a "New Event" button. The "New ...
3
votes
1answer
365 views

Saving entries in admin panel

I have a problem with the admin panel being very slow when saving an entry. It takes about 30 seconds to save an entry. I use a matrix for the different part of the entry (imgs, textfields, titles and ...
3
votes
1answer
104 views

Many versions of the same structure of entries?

If I had a structure representing the user guide of a product; is it possible to select a specific version of user guide entries from a URL? http://www.example.com/myproduct/docs/v2.0/installation ...
2
votes
2answers
369 views

Entry next sibling return a deactivated entry

I got an entry template from a structured section. With prev / next nav links at entry bottom. But the next sibling is deactivated. So the page return is 404 not found ! {% set prev = entry....

1
2 3 4 5 6