Skip to main content
added 61 characters in body
Source Link
Brad Bell
  • 67.6k
  • 6
  • 75
  • 145

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 %}

Something like this should do what you're looking for:

{{ craft.entries.section('scripts').order('postDate DESC').first().title + 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 %}
Source Link
Brad Bell
  • 67.6k
  • 6
  • 75
  • 145

Something like this should do what you're looking for:

{{ craft.entries.section('scripts').order('postDate DESC').first().title + 1 }}