Results 1 to 5 of 5

Thread: Catalog Related connectable with Catalog List

  1. #1
    User
    Join Date
    07-13-09.
    Posts
    83

    Default Catalog Related connectable with Catalog List

    Hello there,

    I wanted to make a very simple website with events at different locations.
    i´ve come across a problem (catalog related can only be connected with a catalog reader not a catalog list) and after hours of playing around i now try it via forum.

    I have two catalogs. CAT 1 and CAT 2.
    CAT 1 is a catalog with my friends name and adresses.
    CAT 2 is a catalog with events (partys, concerts, etc.) and a SELECT Menu, where you can choose one of my friends name as the location for the event.

    In the frontend I´ve put a CATALOG FILTER for CAT 1 in LEFT. In MAIN is my CATALOG LIST with a custom template displaying the name, street and city of my friend.
    this works fine. when i click "SUSAN" on the CATALOG FILTER her data shows up and the CATALOG FILTER behaves like a menu (the selected name can be styled via CSS).



    unfortunately, i can not use a CATALOG RELATED to display the events that take place at Susans place because the catalog related only works with a CATALOG READER.

    I´ve tried using a CATALOG LIST as a menu, CATALOG READER in main and above the CATALOG RELATED. That all works but I can not style the active "menu element".
    I´ve also tried it with the CATALOG REFERENCE but either I didn´t make it right or it´s not compatible with 2.9. I know it says that catalog 2.0 beta is not compatible with 2.9 - but I haven´t had any problems so far.

    Can anyone recommend me how to work out this issue? Thank you very much!
    V

  2. #2
    User
    Join Date
    07-01-09.
    Posts
    91

    Default Re: Catalog Related connectable with Catalog List

    From my limited knowledge, The biggest thing you have going against you is the direction of the relationship. Since your relationship between the two databases is established in catalog 2, there isn't a reference field to follow from catalog 1.

    In case it helps, here is some example code that will show related content from catalog 2 in a listing entry in catalog 1. Catalog 1 has a field called accessories that uses tags to list entries in a second catalog so you can select multiple related accessories for the entry in catalog 1.

    Code:
    <?php if ($entry['data']['product1_accessories']['value']): ?>
    
    <?php foreach ($entry['data']['product1_accessories']['ref'] as $value): ?>
    <?php echo $value['product2_name'];?> // Or whatever else you want to pull
    <?php endforeach; ?>
    
    <?php endif; ?>
    Product1_accessories is a field in catalog 1, product2_name is a field in catalog 2.

    Now, were I listing products in catalog 2 and trying to find the reverse relation into catalog 1, I don't know how to do that though I'm sure it's possible with some more in depth knowledge of php.

  3. #3
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Catalog Related connectable with Catalog List

    just use Catalog REFERENCE, not related (related is only for items in THE SAME catalog but with modified search parameters).

  4. #4
    User
    Join Date
    07-13-09.
    Posts
    83

    Default Re: Catalog Related connectable with Catalog List

    hello thyon and harley, thanks for the awnser.
    i´ve used the reference catalog for a very similar thing thing before. worked great, but for some reason i can´t get it running again.
    i´ve posted screenshots of my two catalogs and the refernce module.
    in CAT 1 i have [title:text] which can be selected in CAT 2 via a select field [location:select].

    In the reference i used the [id:internal] as the match field and [title:text] as the reference field.
    Nothing is displayed.

    CAT 1


    CAT 2


    REFERENCE MODULE

  5. #5
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Catalog Related connectable with Catalog List

    That should work, but maybe you need to check the values in the database as well to ensure that you are doing what you're trying to do.

    Catalog referencing is only possible in 1 direction... if you're trying to do the reverse, it's easier to do with a simple list....

    Catalog List Module
    - Catalog 2

    Condition Clause (WHERE)
    - id={{catalog::fieldname}}

    Catalog inserttags are only available on a reader page though.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •