azrael007
Total posts: 10
18 Апр 2015 11:56

Hi there,

This is my first post here on the forum. First thing, Cobalt 8 is a great CCK.

I have just purchased Cobalt - Module - Records in order to display on a map some items. Everything is working well but i have a problem. Let me explain :

At first i have my architecture like : 1 section - cat1 - cat2 - cat3 - cat4 1 type

I would like to use a different submission form for every categories. It's looks like impossible to have 1 type and show/hide fields according to specific categories.. so i move to

4 sections 4 types

Now i have a different problem, i can't display on a single map items from differents types ! I can't do something else before solving this problem. What should i do? Choose between having the same sub form for different category? or cannot show items form different sections?

Thanks in advance for your help.

Последние изменения: 30 Апр 2015


pepperstreet VIP
Total posts: 3,837
19 Апр 2015 00:03

Hello azrael007 and welcome to the world of Cobalt! ;)

Cobalt has many options and ways to organize your data. Usually you can have different structures i.e. 1 Type per Section, Multiple Types per Section... but there are some special limitations with Record module and/or Map template:

  • the Record module works with 1 Section / 1 or multiple Types.
  • the Map template allows to select 1 field to retrieve the location data.

So, I guess your first assumption and architecture is one way to solve the problem. All your "types" should share the same location data field.

As you mentioned already, there is no build-in feature that allows to show/hide fields based on category...
at least not by default templates and simple configuration.
But it should be possible to create a dynamic custom form and JavaScript.


@MintJoomla / Sergey
Maybe there is way to extend/modify the Map template to allow more than 1 location field as source... !?


azrael007
Total posts: 10
19 Апр 2015 17:18

Hello,

Thanks for the quick answer.

As pepperstreet said i move back to 1 section / 4 categories with 4 types.

In fact i solve the problem using :

  1. mysection/parameters/submit type and select my types used. The trick is it's not a simple select, it's a multi select (you have to use Ctrl on the keyboard for multiselect ;) )
  2. edit each types with submission parameters/who can cetegory select : registered and i set a cetegory limit to the other types. In that case only the good one category is display for the proper types !

Great advance today !


pepperstreet VIP
Total posts: 3,837
20 Апр 2015 01:49

azrael007 ... back to 1 section / 4 categories with 4 types.

  1. mysection/parameters/submit type and select my types used. The trick is it's not a simple select, it's a multi select (you have to use Ctrl on the keyboard for multiselect ;) )
  2. edit each types with submission parameters/who can cetegory select : registered and i set a cetegory limit to the other types. In that case only the good one category is display for the proper types !

Congrats! Exactly how you should setup a multi-type section :)

Great advance today !

I don't want to discourage you... but you still have a problem with the current Map template! Hence the parameter where you get the location data from :(

As far as I know, you can't show multiple Types on the same map (yet).


How complex and different are your types?


azrael007
Total posts: 10
20 Апр 2015 08:59

Hi,

This works fine for me with the map template.

I have the same geo field label for every types i made.

I cannot show you actually cause im on localhost. Soon i hope ;)

Let me show you this :

http://hpics.li/ad46735

http://hpics.li/2e81323


pepperstreet VIP
Total posts: 3,837
20 Апр 2015 20:22

azrael007 I have the same geo field label for every types i made.

I know that SAME LABEL NAME works for sorting and filtering.

But does it work for the MAP template and geo field(s)!?
I am not 100% sure. Please, check that first before spending to much time in your current setup.

Example - Map template parameter - geo field selection

Only 1 field can be selected, not sure if same LABELS are recognized automatically,
or have any effect on the map output:
cob_map_template_geo_field_position_data_source


Sergey
Total posts: 13,748
23 Апр 2015 02:53

pepperstreet Only 1 field can be selected, not sure if same LABELS are recognized automatically,

Yes, it is. It uses field key instead of ID. So articles of all tipes with same label geo fields should be there.


pepperstreet VIP
Total posts: 3,837
26 Апр 2015 00:31

Yes, it is. It uses field key instead of ID. So articles of all tipes with same label geo fields should be there.

Good news! Thanks for clarification.

(Suggestion: Maybe a help tooltip on the template parameter could mention that important detail)


azrael007
Total posts: 10
29 Апр 2015 07:21

Thanks sergey for the answer.

Its works for me this way with 1 field selected.

By the way, i have a question about the map : where can i set the hide/show parameters for the popup information of the item display on map?

Sans titre


pepperstreet VIP
Total posts: 3,837
29 Апр 2015 21:39

azrael007 where can i set the hide/show parameters for the popup information of the item display on map?

The Marker Info Window template is set in your Geo field parameters. (scroll down to the bottom)

Slightly different to the usual Cobalt templates. You can only exclude fields by configuration. Markup and other infos have to be modified in the template file. Which can be found here:

/YourJoomla/components/com_cobalt/fields/geo/tmpl/window

You should copy and rename the default.php file and edit it to your liking.
Then select your new template in your Geo field.


Sergey
Total posts: 13,748
30 Апр 2015 12:50

azrael007 By the way, i have a question about the map : where can i set the hide/show parameters for the popup information of the item display on map?

I afraid you cannot completely turn it off.


azrael007
Total posts: 10
30 Апр 2015 16:00

Thanks for your answer ! Just add some /* line 14 and line 37 */

Sans titre


pepperstreet VIP
Total posts: 3,837
30 Апр 2015 19:11

azrael007 Thanks for your answer ! Just add some /* line 14 and line 37 */

Headups for all modifications:
Make sure you are creating an override (if possible),
or creating your own copy and rename it accordingly.

Работает на Cobalt