justb3a Posted March 10, 2017 Posted March 10, 2017 GUID Generator Generate a globally unique identifier (GUID) for Inputfield Text. Usage For each instance of a text field the field settings will be extended. Navigate to Admin > Setup > Fields and edit the desired field. Click on the Input Tab and click on the "Generate GUID" area. It extends downwards and reveals a form to enable automatic GUID generation. After having enabled GUID generation for a text field, edit a page which has a template containing this field. You'll see the field filled with a GUID. 14
bernhard Posted March 16, 2017 Posted March 16, 2017 could you please tell us what you use it for? i know what it does but sometimes it's easier to get the context by an example. thank you
justb3a Posted March 16, 2017 Author Posted March 16, 2017 The company which I'm working for develops apps, too. And for one of them we need a little notification system. Just a little endpoint which returns json. The app saves all notes which have been sent to the user. To be able to identify which message has already been shown, we need a global identifier. The workflow is as follows: Login PW Admin add a new page, the "id" field will be populated with a GUID fill in all other fields which should be sent an endpoint returns json, for example something like the following [ { "id":"936DA01F-9ABD-4D9D-80C7-02AF85C822A8", "url":"https:\/\/domain.com\/endpoint\/notice1\/", .. }, { "id":"A36DA01F-9ABD-4D9D-80C7-02AF85C822A8", "url":"https:\/\/domain.com\/endpoint\/notice2\/", .. } ] as you can see, for each note there's a "detail" page which will return the actual message if someone opens the app, it checks whether there are new notes and displays them 7
dragan Posted August 27, 2018 Posted August 27, 2018 @justb3a I want to somehow create a unique page-slug (page name) for certain pages. Do you think your module could be tweaked (maybe with a hook or otherwise), to let authors create a unique page name, in page-edit mode? This would be awesome. The reason behind it: I want to create content, where only people who have that URL have access to it, without the author having to create a login / user first. I know, this is commonly called "security by obscurity", but for our use-case that's enough.
bernhard Posted August 27, 2018 Posted August 27, 2018 2 hours ago, dragan said: Do you think your module could be tweaked (maybe with a hook or otherwise), to let authors create a unique page name, in page-edit mode? This would be awesome.
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