hafa Posted September 18, 2014 Posted September 18, 2014 How to auto-generate random URLs in PW? For example when we upload images on Tumblr, an URL to the post is created with a random number "95032257420": http://twotimeselliott.tumblr.com/post/95032257420 And an URL for the image is created: http://31.media.tumblr.com/2142197f5273865770be44723c2a5df0/tumblr_nagyr9INCE1r6ky2bo1_500.jpg How can we do that in PW?
LostKobrakai Posted September 18, 2014 Posted September 18, 2014 (edited) Have a look at these modules. http://modules.processwire.com/modules/link-shortener/ http://modules.processwire.com/modules/process-field-generator/ http://modules.processwire.com/modules/process-custom-upload-names/ Edited September 18, 2014 by netcarver Fixed first link - it was broken
Nico Knoll Posted September 18, 2014 Posted September 18, 2014 Why would you want that? Btw.: Why not just using $page->id ? 1
OrganizedFellow Posted September 18, 2014 Posted September 18, 2014 hhmm. My interest has been piqued!
Pierre-Luc Posted September 19, 2014 Posted September 19, 2014 As mentioned before, modules.processwire.com/modules/process-field-generator/ is a module I made that does exactly that. Reason why I personally needed it : the ID of content had to not be discoverable and a fixed length. Page IDs don't provide that. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now