We’re rewarding the question askers & reputations are being recalculated! Read more.
8

You can use any Twig in the dynamic title field. There are plugins that provide Twig filters to truncate text, but here’s how you can do simple truncation without any plugin. {{ object.myTextField|length > 50 ? object.myTextField|slice(0, 50) ~ '...' : object.myTextField }}


7

You can access the Software entry’s title exactly the same way you would in your front-end templates: software.first.title. The only difference is the single-brace tags syntax, which you don’t even have to use if you don’t want to. Both of these are identical: {software.first.title} {{ object.software.first.title }}


4

If you set the title format to a string like "Note" in the channel's field layout, all your entries will be given this exact name. The entry slug will be saved prefixed: "note-1", "note-2", etc. If you don't want them all to be named the same, you could add a date to it: Note {{ 'now'|date('Y-m-d') }} This approach has one problem, if you make an edit to ...


3

You can generate the Variant titles automatically, but not for top level Product Types:


3

So odd, I actually just arrived at this. It was from using the Guest Entries plugin and I wanted a front end form that created a derived title. My solution was to create a hidden input with the title value as dummy content. <input type="hidden" name="title" value="placer" /> When the Entry Service ran, it saved the entry with the correct derived ...


3

I think you could also use Twig's join filter instead of the for loop: {{ object.category | join('/') }}


2

When you use the single brace tag syntax within your URL Format field: {category.first().title} that’s actually a shortcut for this: {{ object.category.first().title }} So, object is the actual variable name that you can use to refer to your entry, when you want to use the normal Twig tags {{ ... }} and {% ... %}. {% for categoryList in object.category %...


1

See reply from brandonkelly on GitHub for an alternative to adress this issue. https://github.com/craftcms/cms/issues/5132#issuecomment-544507473


1

Since the slug is used to generate assets folders, accents aren't suitable and results in question marks in the folder names. You could do something similar to How to rename filename of asset before (or after) upload in Craft 3 in a plugin except you run the folder name through the same ASCII normalization process that auto-generated slugs go though.


1

Something like this should do what you're looking for: {% if not object.id %}{{ craft.entries.section('scripts').order('postDate DESC').first().title + 1 }}{% else %}{{ object.title }}{% endif %}


1

There is a feature request for this on GitHub. So suggest you go and 'up-vote' it on there to try and get this released. https://github.com/craftcms/commerce/issues/148


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