9 Posts
wellis
5 years ago
12
Topic

Hello

I have a list which displays an uploaded image along with 11 values from radio select options in a table.

I'd like to display the table with all the related values from the radio fields in a modal box when the image is clicked.

When I add the modal into my template override and add the table to the body of the modal I get the first table values entered but when I click on any othert

image I get the same table from the first article.

Here is a link to demonstrate. Modal Issue

if you click on the person eight image you'll get the modal with their corresponding values but the click on the image below(person 7) and you'll get the table values for the Person Eight and Person Eight values for all the other images.

Thanks for any help

William

Get a Book for SEBLOD
1283 Posts
Bucklash
5 years ago
11
Level 1

Hi

I think the modal position the Seblod templates are outside of the list so it renders the last one, I might be mistaken though.

A solution might be “fragment as resource” but I have no Idea what that is...

Another solution is to use slicked minima template. It is free and you can render the modal per list item using “advenced view” in list view which then allows you to use “item” view which uses slicked minima.

I did that and use art_id as value to trigger modal ...

and use blank view, create all necessary fields to create the modal and assign the ‘modal trigger’ ie art_id

If use it I can help out ;)

also, if want latest and the version I use, you can email at fretroom.com.au

9 Posts
wellis
5 years ago
10
Level 2

Hello

Thanks very much for your very helpful reply.

I looked for fragment as resource and couldn't really find anything meaningful or useful do I'll follow your lead and use the Slicked Minima template.

I'll email you for the latest version and reply back here with how I get on in case it might help anyone else.

Thanks very much.

9 Posts
wellis
5 years ago
9
Level 3

I'm happy to report that I managed to add a modal for each item in the list with a little bit of 'creativity'.

For those in the same position this is what I did - 

As each modal needs an Id which of course needs to be unique I first tried to use the art_title value as the Id.

This generated something along the lines of - '/latestconsent/index.php/list/person-eleven-2' - which wouldn't work.

So I stripped away the first part using str_replace which resulted in a string of 'person-eleven-2' which I used as the new id for the modal.

This has worked a treat and I'll create a lesson on how to do it step by step at the weekend.

Thanks for your help Bucklash.

1283 Posts
Bucklash
5 years ago
8
Level 4

Glad you found a way that makes sesnse to you.

I use art_id as unique value... :)

9 Posts
wellis
5 years ago
7
Level 5

Thanks Bucklash

I'm very new to this but art_id was the first thing I tried to use. I just couldn't retrieve the value. 

I was using   $cck->getValue( 'art_id ) and just couldn't make it work. 

Is that the wrong way to get the article id value?

Thanks

1283 Posts
Bucklash
5 years ago
6
Level 6

Was it in your item view i.e in any of the positions? modal, elemenet, mainbody etc...

9 Posts
wellis
5 years ago
5
Level 7

Yes - in the mainbody overide within the item folder for Seblod_one.

You can see it in action here - Consent App :)

1283 Posts
Bucklash
5 years ago
4
Level 8

Hi

It would need to be in the Slicked Minima template somewhere....

9 Posts
wellis
5 years ago
3
Level 9

Hello Bucklash

I'm actually using the Seb_one template. 

I tried emailing you to take up your offer of the Slicked Minima docs through your website when you first replied but as I didn't have the docs I just used Seb_One.

I think this would have been a lot easier if I would have used the Slicked Minima Template though.

1283 Posts
Bucklash
5 years ago
2
Level 10

Manual should be in same email as template hmmm....

9 Posts
wellis
5 years ago
1
Level 11

Sorry Bucklash but I didn't recieve any email...

1283 Posts
Bucklash
5 years ago
0
Level 12

Maybe is in spam box. oh well, you resolved it anyway

Get a VIP membership