Tags available for a specific album

Define tag within SharinPix Permission object (for Lightning only)

Under Lightning you can use the SharinPix Permission object to set abilities for a SharinPix Lightning Component.

This is fully described here: SharinPix Permission object.

Within the SharinPix Permission object, you can use the "Available Tags" field to list all the tags that you would like to be always available in the tag menu.

Please remember that you have to use the Tag Name (not the label) and separate multiple values by a ; (semi-colomn).

Define tag within the SharinPix Parameters (with Apex Controller)

  • It is possible to define the tags available for a specific through the SharinPix Parameters.

To know more about SharinPix Parameters, refer to this article: SharinPix permission

  • The code snippet illustrates a set of SharinPix Parameters that contains a tag named work.
Map<String, Object> params = new Map<String, Object> {
            'Id' => albumId,
            'abilities' => new Map<String, Object> {
                albumId => new Map<String, Object> {
                    'Access' => new Map<String, Boolean> {
                        'see' => true,
                        'image_list' => true
                    },
                    'Tags' => new Map<String, Object> {
                        'work' => new Map<String, String> {
                            'en' => 'work',
                            'fr' => 'travail'
                        }
                    }
                }
            }
        };
Click to copy

Define tags within SharinPix Parameters (without Apex Controller)

  • The code snippet below illustrates a set of SharinPix Parameters defined inline within a Visualforce Page that contains a tag named work. This code represents  a method that defines a tag within SharinPix Parameters without the use of an Apex Controller.
<apex:page> 
 <sharinpix:SharinPix height="500px" 
    parameters="{
         'Id': '{!CASESAFEID($CurrentPage.parameters.Id)}', 
         'abilities':{'{!CASESAFEID($CurrentPage.parameters.Id)}':
            {'Access': {
                'image_delete':false,
                'image_upload':true,
                'image_list':true,
                'see':true }
            }
        }
    }" 
    /> 
</apex:page>
Click to copy

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.