Search

I asked this in another thread, but I wanted to cast a wider net!

I'm building an extension that hashes the ID of an entry. Is there a way to do some kind of callback during the entry creation process so that the field is populated when the entry is created, rather than requiring the user to re-save the entry to generate the hash?

This will be particularly important if I want the field to work properly with events (haven't even looked at this yet)!

Anyone done anything like this before? Got any tips? :)

Reflection Field does exactly this. I've linked to reference code in the other thread mate.

Just a clarification - Reflection Field, from the best of my knowledge runs after an entry is created. Once created the script runs the function and updates the field manually, things like entry url also take the very same approach.

If you want to do it automatically during entry creation starting from the Reflection Field would probably be a good start, especially if you need to re-use entry data.

Hi @gunglien

Sorry this conversation continued in the other thread - I did borrow some functions fro the reflection field in the end (I'd already out together the basic extensions) - and have it working as required now!

I just have to get the same thing working for events now (when I get the time) and the basics will be in place!

@Nathan,

Check the other Delegate in the Reflection field.. that one deals with frontend compile of the field ID.. EntryPostCreate/EntryPostEdit etc..

Yup, had already seen it, just hadn't got round to it yet! Am going to look into integrating it shortly.

Oh I literally just needed to add a few lines, would have done it at the same time if I'd realised :D All done.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details