Questions tagged [index]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

Update Search Index on Entry create and update

I have a multiselect drop-down for age group and I have set "Use this field’s values as search keywords" check box checked. when I create a new entry or update existing entry . we are not ...
user avatar
0 votes
1 answer
73 views

How to override homepage content through plugin?

Want to override index.twig content through a custom plugin. I want to create a plugin that appends some content on website homepage. How to Achieve this any reference will be helpful
user avatar
  • 13
1 vote
1 answer
319 views

Custom Module: new element type index page access

Hello I've created a new element type in a module (a web app within Craft) that I'm developing. I have initially created my models to be craft\db\ActiveRecord and save directly to their tables, but ...
user avatar
1 vote
0 answers
80 views

New entries only searchable by title field

I've recently done an upgrade of our site and am having issues with finding entries in the admin. I keep entries for people who register a product so we have fields like registrationSerial and ...
user avatar
  • 123
1 vote
2 answers
24 views

Getting an zero index and count for an entry list

I currently have an entries field which outputs a list of related entries on page. I'm trying to find a way to display two values for these entries. The first would be a zero index. I'm trying to ...
user avatar
  • 245
3 votes
1 answer
172 views

Custom CP Element Indexes

I'm working on a custom Craft 3 site, and I need to be able to configure the element indexes within the control panel for a few of my custom EntryTypes. There's two particular things I'd like to ...
user avatar
0 votes
0 answers
44 views

Craft 3 Multi-site with no “default” site AND where control panel login route remains intact and additional directories not necessary

Maybe one of you can help me out? I've tried setting up a multi-language site with no "default site" as per Craft 3 Multi-site with no "default" site. So far so good, except the control ...
user avatar
1 vote
2 answers
313 views

Updating Asset Indexes Fails with TemplatesController Not Found Error in Craft Logs

Client wants to be able to upload a 90MB .mp4 file to a local asset folder, that understandably throws a 'General error: 2006 MySQL server has gone away'. I uploaded the file directly to the server ...
user avatar
1 vote
2 answers
11k views

How do I target the second item in an array with Twig?

I would like to select the second position in the array below. The problem is that this number is automatically changed. So I try to do this with .index function from Twig but I can not figure it out. ...
user avatar
1 vote
1 answer
42 views

How do I target the 3rd entry and only that entry?

I am trying to build an Index page and assign a specific card template to the 3rd entry and only the 3rd entry. {% set items = craft.entries.section('posts').all() %} {% for cardC in items.offset(2)...
user avatar
  • 891
1 vote
1 answer
187 views

Why does index.php persists in my URL?

I've gone through all the steps here to remove index.php https://craftcms.com/support/remove-index.php The .htacess file is the default one that came with Craft on install <IfModule mod_rewrite.c&...
user avatar
1 vote
1 answer
40 views

Copy of subsite is still serving index.php in the links?

I have 2 subsites on the same apache server both pointing to the same craft database. The original subsite has the normal links, but, the subsite copy has index.php in all of the links. Can someone ...
user avatar
1 vote
2 answers
539 views

Get a specific entry by its index or number?

I'm working with a carousel that has two rows. Each item in the carousel displays an icon for a "media partner". This works all fine and dandy until there's an odd number of media partners, because ...
user avatar
  • 21
0 votes
1 answer
359 views

Removing index.php strange issue

I already had this question posted but I didn't include enough relevant information so I deleted it and here I go again... I have a weird issue currently on my Craft setup. I have removed index.php ...
user avatar
  • 67
0 votes
2 answers
86 views

Blog pages not indexing SEO

We are encountering an issue where some/most of our blog pages are not indexing with Google. Some random blog pages are indexed but most are not. The pages are being rendered correctly by the google ...
user avatar
  • 293
0 votes
1 answer
309 views

Update Asset Index SQL Error

I understand there's a lot of work being done on the Update Asset Indexes feature. I believe I've run into another issue related to MySQL, whereas other issues have been related to PHP's memory_limit. ...
user avatar
  • 23
4 votes
1 answer
734 views

Cannot remove index.php from URLs either

I am having the same issue as here: Another index.php?p= problem I tried to post this as a comment rather than open another post but I don't have enough reputation... I have tried all of the ...
user avatar
4 votes
1 answer
236 views

Reusing logic to set string variables

I would like to set some variables for every entry within a section ('courses'), and then use those variables in loops that are filtering by entry types and categories. Some simplified markup: <...
user avatar
2 votes
1 answer
464 views

How do you programmatically update an asset index?

I am trying to update an asset index from a plugin but can't seem to get it to work. Looking at the docs this seems to me like it should work but it does not. I am on the right path here? $ses = ...
user avatar
3 votes
2 answers
2k views

Loop divisible by issue

Code: {% for block in entry.testimonials %} <div class="col-24 {% if loop.last %}gutter-bottom{% else %}gutter-bottom--none{% endif %}"> <div class="section inner"> <div ...
user avatar
  • 879
1 vote
2 answers
1k views

Trouble with login admin

I'm having trouble in the control panel. I'm get logged out all the time and I can't find the reason. The "Your session has ended" modal window appears all the time, I can just do a refresh and it ...
user avatar
1 vote
2 answers
1k views

Update Search Index on Entry Save

Wondering if there is any way to force Craft to update the search index for an entry when it is saved. Reason I ask is that on our site we have a Location entry type with lat/lon inputs that we use ...
user avatar
  • 127
1 vote
2 answers
439 views

Craft assets indexing wants to remove files that still exist

Launching the task Update Asset Indexes in CP Settings / Tools. At the end of this task Craft propose a dialog box for you to check some missing files that has been removed from the asset source/...
user avatar
  • 972
1 vote
2 answers
380 views

Change custom element Index title via getTableAttributeHtml?

I want to change the title in the index of an custom element. public function getTableAttributeHtml(BaseElementModel $element, $attribute) { switch ($attribute) { case 'title' : ...
user avatar
  • 685
1 vote
0 answers
78 views

Indexing Large Files in Assets

I uploaded a couple mp4 video files via FTP. One is 3.28GB, the other is 5.53GB. I updated Asset Indexes in Settings, but they are not showing up in Assets. I checked the DB and they do not show up ...
user avatar
2 votes
1 answer
951 views

Home page won't load without 'index.php'

On a fresh install of Craft 2.3.2644, using the hostname alone, example.com returns an error, "The page cannot be displayed because an internal server error has occurred". If I include /index.php (...
user avatar
0 votes
1 answer
204 views

Update Asset Indexes on Login

I'm using an assets directory with Amazon S3 and I have to manually update the indexes through the control panel after uploading files externally. Does anyone know if it is possible to do anything ...
user avatar
  • 325
3 votes
4 answers
2k views

Can't remove index.php from my URLs

I edited .htaccess as described here http://buildwithcraft.com/help/remove-index.php and added this 'omitScriptNameInUrls' => true, to craft/config/general.php, but it doesn't work. Image: I also ...
user avatar
  • 165
3 votes
1 answer
3k views

htaccess www to non-www redirect (and config.php)

I need to set up a redirect from the www version of my site to the non-www version for SEO. I found a solution that would work here if it weren't for the fact that it breaks the index.php redirect ...
user avatar
  • 3,195
10 votes
2 answers
1k views

Update Asset Index in Batches

I have 80,000+ files on S3 that need to be added to Craft. The Update Asset Indexes works, but takes over 24 hours and cannot be interrupted. Does anybody have a way to programmatically index assets ...
user avatar
4 votes
1 answer
313 views

Setting arbitrary PHP constants in index.php

I was looking for a way to set arbitrary PHP constants in the index.php that could then be accessed within templates. This is particularly useful if you have more than one index/domain pulling ...
user avatar
0 votes
1 answer
160 views

6 month old site is suddenly throwing 404s

http://denizen.tv/work/2011-kca-image-campaign http://denizen.tv has been up and running well since June, but it's suddenly throwing 404s. It looks like the same /index.php/ problem I was recently ...
user avatar
  • 33
3 votes
2 answers
1k views

Removing /index.php/ from url breaks site

When I try the solution mentioned here, my site breaks, pages not found. Even the /admin/ pages break, losing all styling. The only page which loads is the homepage. Any thoughts about why? I was ...
user avatar
  • 33
2 votes
1 answer
545 views

Any documentation about the elementindex template available?

I'm trying to customise the elementindex view. For example I want to filter out some entries that don't match certain criteria. Also if possible add some hooks to the read calls. Is there any ...
user avatar
  • 569
3 votes
1 answer
184 views

How can I check the progress of a large Assets indexing job?

I just uploaded 48,000 photos to Amazon S3, added the bucket to Craft, and am now trying to add them to the Assets library. Where can I see the logs for this?
user avatar
4 votes
1 answer
376 views

Better way to find a specific asset?

I'm currently using a route to get a specific asset for a gallery section of my site. URL is similiar to http://craft.dev/place/place-name/gallery/1 (Where 1 is the number in the gallery.) I'm ...
user avatar