I would like to offer my users the ability to Customise their profile through the use of Tiles. There will be different types of tiles, each with a different layout. They can add these to their profile and customise the content.
How would I achieve this. They should be able to add as many of these tiles as they like and rearrange the order.
I thought of a repeating group with type ‘Tiles’ but then I got confused as how i’d build it to allow them to choose any type of tile within this.
For example:
1. Text Tile - Subject line (bolded) then text body. 2. Photo TIle - Adds a single photo. 3. Button Tile - Adds a button which they can customise the text & 4. Link Tile - Adds one or multiple links.
I have done this before. It takes a little ‘outside of the box’ thinking. So what I did was:
When displaying the information, use a repeating group where all potential tile types are in one cell. Then depending on what tile the user chooses, only display that tile element in the cell using conditionals. That will create an unlimited list of tile type options for the user.
I would give an example for you but at the moment I am booked fully with back to back appointments till Monday, so far. So, once I get a spare moment, in between sessions, I can try to work on an example. It may take a while since I have to give priority to those who book sessions first. Hope you can understand.
Makes sense. Is there a way to put the different tile types in the same cell, having them show in the same position without putting them directly on top of eachother which is a pain for making edits to the layout of the tile?
Yeah. I would suggest not overlapping the elements. Stack them like legos down the page. It will be only showing one of those tile elements, so it won’t matter the stack order or the height of each element. Hope that makes sense.
Thanks - what would the best practice be for the data model?
One Data Type called ‘Tile’, then a ‘Type’ field (Social, Text, Image), then all the relevant fields to deliver all these types of Tiles on that one Data Type (Tile) (ie. Title, Text Body [text tile] , Instagram Handle [social tile] , Facebook Handle [social time] , Image [used in image tile].
Or would you recommend I have a Tile type which has ‘Type’ then have a seperate data type for Text Tile, Social Tile etc.
The only nuance is when a single Social Tile has multiple social icons or a single Links tile has multiple Links which leads me towards a RG? Presume a RG inside the RG with conditional for those items.
I would do one data type with all of the fields in it. Just show the relevant ones to the user. It would be one repeating group but multiple groups in the cell. That way you would only show the group that corresponds to the correct tile type in that cell.
But what happens if I want to offer the user the ability to add One Tile which has a series of Links in (ie. they can add 10 links in one tile). I think for this I’d need another data type called Links Tile then a field on the Tile Data Type called Links (list type). Right?