332 Posts
Kenneth
10 years ago
13
Topic
Hello,

I have created several modules with their own positions. These modules have contact information to different people.

What I want is a simple drop down field where one can select a contact person, and by that the associated module should be loaded.

I find no way to controll this. Ive tried typing in this in the options for the simple dropdown field:
Contact One=

This gives no desired result. I manage to see content from the module in the form, strangely enough, but not in the content.

The loadposition module is set to order 1, so SEBLOD content is being parced before the loadposition plugin.

Any ideas?
Get a Book for SEBLOD
175 Posts
webcastor
10 years ago
1
Level 1
Have you considered doing a Search&List module?
332 Posts
Kenneth
10 years ago
0
Level 2
I'm not sure how that would help? Will that enable me to use the dropdown to load a moduleposition based on the selection?
175 Posts
webcastor
10 years ago
1
Level 1
Actually, I thought about having contact information in a data type. That way you would just create a connection (relation) between two data types. As a bonus, that way you have the option to display title (contact name) or intro (selected contact info).

On account of displaying particular module based on your selection, I think you might have a look at NoNumber Advanced Module Manager or try to put to good use Conditional States & Computation (in Site Form).
332 Posts
Kenneth
10 years ago
0
Level 2
I'm using NoNumbers Advanced Module Manager, but theres no pattern to follow to get it working as wanted.

The tought of this is to have the client add new reference projects for their site, and just to select a contact person for this reference. And by selecting this contact I want some information to appear. I just tought loading a module position (or module) would be the easiest and best way to do so.

Can that be done with Conditional States & Computation (in Site Form).?
175 Posts
webcastor
10 years ago
5
Level 1
You can create a field for every single module and based on contact selection show or hide the field, but that would amount to too much work, and you should renew the computation for every new contact.
Why is having a data type for contacts such a difficult task? You can always treat them as related content.
332 Posts
Kenneth
10 years ago
4
Level 2
Related content? That could work. I'll look into that. 

Regarding the dynamic field, how can that be used to this?
4229 Posts
Kadministrator
10 years ago
3
Level 3
With dynamic field you pull options from database, you can query modules table to find your modules. This will create a value you could then use with conditionals to fill in the right module name
332 Posts
Kenneth
10 years ago
2
Level 4
Hello Klas, and thanks for the answer.

Seems like a lot of unnecessary work. I see that {loadposition} tag was working in site form. Do you have an idea to why it isn't working in content?

With just a simple selectbox, where we set value to be a it should render, right?
4229 Posts
Kadministrator
10 years ago
1
Level 5
I don't exactly understand how you plan to push dropdown value to the loadpostion , also it is not clear to me where do you insert this loadposition tag? Seblod has its own module field, try looking at that
332 Posts
Kenneth
10 years ago
0
Level 6
Okay. I've got a dropdown list with 5 different persons.

I have also created 5 modules that hold contact information for these people. These modules are shown on different parts of the website.

I want to have it so that when I select one of these five person when I create new content, the real value that is being grabbed from $cck-getValue('field_name') is .

I've tried labeling the values of the dropdown to "Name Contact=" but it just dosn't render.
10 years ago
0
Level 1
Use a Select Dynamic field for example
10 years ago
1
Level 1

Hey Kenneth,
were you able to create a solution?

The problem with multiple modules is, that modules to be displayed are only determined once,
during the page creation process in Joomla.

What you need is ONE Search module with the dropdown you mentioned.
The item view of the list of results then displays the matching contact information.

If you want to do it with modules, the complete page would have to be reloaded.
Use a Search Type and within that, take advantage of the tips given in this thread.

332 Posts
Kenneth
10 years ago
0
Level 2

Thanks for the reply.

We left Seblod a while ago. We are currently using form2content instead and are happy with that.

There were just some things that wasn't in place regariding seblod that made us switch, which is sad because I see a amazing potential.

Get a VIP membership