I need to use some kind of "encoded" value for title/url-title, and I was thinking of using md5 or sha-1 hash code for this. The idea is that user receives email link to the entry, but it is supposed to be hard to guess other public entries (if I based them only on enrty_id for example).

Is this best way of doing this or there is maybe some other kind of code it would be suitable. My idea was to generate random md5 and put it on title (safecracker).

Thanks dp


1 Answer 1


As I think, you would like to set entry page URLs wouldn't have url-title or entry-id so that no other URLs couldn't be guessed and your URL would be like yoursiteurl.com/[encoded string in MD5 or SHA1]. Right ???

If so I would suggest you to use EE's Pages module or Structure module and enter the Page URI as encoded in either MD5 or SHA1. You can code you template code to detect those URIs and show the entry page.

Also, you can make this encoding dynamic so that there wouldn't be needed for admin to enter encoded Page URI while editing/publishing an entry by creating an extension which will do it.

  • Exactly, the title would be the same as url title, as it will not contain any important info besides the identifier. this entry is generated by safecracker and in this case there is no need for pages module. my question is more about what kind of code to use for this kind of things, not sure if md5 or sha1 is more suitable for this. I saw some websites handle their reservations in this format xxxxx-xxxxx-xxxxx-xxxxx dash separated code, not sure what kind of code is this thou.. thanx
    – Davor Peic
    Commented Jun 30, 2013 at 20:28
  • well, the reservation format xxxxx-xxxxx-xxxxx-xxxxx may have some info about that reservation. I have seen most of the time encoded values have some info associated with. But in your case, I think, would wouldn't worry about it. You can also encode the title/url-title in the format of xxxxx-xxxxx-xxxxx-xxxxx. Just you need to think about a login for it. The simplest way would be to have 5 characters random string for each xxxxx. Commented Jul 1, 2013 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.