6 years ago
18
Topic

So, I'm at a loss.  Can't seem to get the groupx results to appear.  I am using a position override and this is the code I'm using in the 

<table class="uk-table uk-table-striped"> <?php foreach($cck->get( 'sk_core_locations' )->value as $gx){ ?> <th> <a href="/<?php echo $gx['loc_book_url']->value; ?>"><?php echo $gx['loc_book_name']->value; ?></a> </th> <td> <?php echo $gx['loc_page_number']->value; ?> </td> <?php } ?> </table>

I even put the render code in to see if it would produce results and that is blank to. renderField( 'k_core_locations' );?>

All is working in the Admin form though, just not on the content

Get a Book for SEBLOD
4229 Posts
Kadministrator
6 years ago
1
Level 1

Ths should work unless you misspeled your field names, you use different name in a loop and in renderField (should be $cck->renderField...)

6 years ago
0
Level 2

Yes, I see that, fixed it and that code still doesn't bring results.  

Maybe I set up the GroupX field incorrectly.  

I set up a "Book Location" Content type with three fields (loc_book_name, loc_book_url, loc_page_number).  

Then in the Content type that I want to use the "Book Location" I have The GroupX field (sk_core_locations)

Copy of Code File

4229 Posts
Kadministrator
6 years ago
8
Level 1

Sounds ok, perhaps also check storages on those fields (see maual). Does it work if you display groupX field in a template without an override?

https://www.seblod.com/resources/extensions/plug-ins/group-x

6 years ago
7
Level 2

I guess I'm not understanding the storage.  Cause I thought I changed things correctly.  

And here is one of the fields in Book Location

4229 Posts
Kadministrator
6 years ago
6
Level 3

Looks ok. Does it work if you display groupX field in a template without an override?

6 years ago
5
Level 4

It's not working because it's not saving the data.  I hit save and then scroll down to see the fields and they are blank

1283 Posts
Bucklash
6 years ago
4
Level 5

Hi 

It looks like your GroupX field is stored in:

#__cck_store_item_content

and your content type is stored in

#__cck_store_form_book_location

6 years ago
3
Level 6

I don't see where you see that or how to fix it.  I wish there was a step-by-step guide to groupX.  If I can understand it once, I should be good to go in the future.

1283 Posts
Bucklash
6 years ago
2
Level 7

Hi

As you may know, there are three tables that data can get stored in.

With respect to Articles:

  1. #__content
    1. default Joomla! table and therefore default fields.
  2. #__cck_store_item_content
    1. Fields created by you that can be used on any content type created that is based on the Article object
  3. #__cck_store_form_[some_content_type]
    1. Fields created by you that can be used only on [some_content_type] 

If a field is either 1. or 2. then it will look like your first image

[CUSTOM|JSON|STANDARD] | ARTICLE | SOME_FIELD

...keep with me...

If a field is 3. then it will look like your first image

[CUSTOM|JSON|STANDARD] | ARTICLE | SOME_FIELD

This field is linked to the following content type [some_content_type]

Your 1st image is number 2 as it is a custom field, but IS NOT linked to a content type

Your 2nd image is number 3 as it is a custom field, but IS linked to a content type

Make sense?

6 years ago
1
Level 8

So I want the fields in the Content Type "Book Locations" to be able to be used in other Content Types as part of GroupX fields. What do I need to do in the "Book Locations" type to be able to do this and what do I need to do in the "Skills" (and other Content Types that will call these fields as part of a GroupX)?

1283 Posts
Bucklash
6 years ago
0
Level 9

Hi

There are two options once you have created a field.

1

Delte field and start again 

2

- Alter storage location for field in #_cck_core_fields

- Delete field from #__cck_store_form_[some_content_type], or from #__cck_store_item_contet, dependending of course on what you want to do.

- Save field in content type form so that the correct table getd the correct field added 

I think any Seblod user should check out the db to see what goes on

I think

6 years ago
4
Level 1

I know it's been a while since I posted.

So I deleted the fields and recreated them and I got it to save again.  But I still can't get the Group X field to display (it's no longer in a position override)

All content type form fields and Group X field are Custom->Article-Introtext

Is there a special App Folder I need to put these in?

4229 Posts
Kadministrator
6 years ago
3
Level 2

It should not be Introtext, you should use some unique column. https://www.seblod.com/resources/extensions/plug-ins/group-x

To display it just put GroupX field in content (or list view). Check that you have put fields you wish to display in the intro (or content..don't remember exactly) view of the content type you are displaying in the groupX. GroupX jsut repeats what is set in child, so if child is empty also groupx will be empty.

6 years ago
2
Level 3

I created a content type that has 3 fields in it (let's call it Location).  This content type is going to be used in the Group X field.  What storage do I put the fields in? And then what storage do I put the Group X field in?

The content field "Location" will be reused as a Group X field in multiple content types is this possible?

Now when I want to display the Group X field in the content view, do I need to bring the fields from "Location" into the content view or just the Group X field?

4229 Posts
Kadministrator
6 years ago
1
Level 4

This is explained in the manual linked above.

6 years ago
0
Level 5

I've read the manual, several times but it doesn't answer my questions cause I'm still in the same spot that I started

6 years ago
1
Level 1

I seem to got the storage sorted out, however, I'm back to the issue with it not displaying.  I'm not using a position override right now.  Using Seb One template and still, nothing.  I have the Group X field in the Content view, but nothing is displayed on the website.  Nothing appears in the source code.

4229 Posts
Kadministrator
6 years ago
0
Level 2

Sorry, but I don't have any ideas left. 

If you buy support hours, I can take a look at your site directly https://www.seblod.com/store/services

Get a VIP membership