Results 1 to 5 of 5

Thread: Link tags

  1. #1
    New user
    Join Date
    10-08-09.
    Posts
    6

    Default Link tags

    Hi...
    I've been trying for hours, but to no avail...
    The task seems simple enough: I have a list of tags for each catalog entry and I want to link them in the full view. I have inspected the arrays and I know the parentLink field is passed on to the module for each tag, but I can't figure out how to make them clickable! I am not much of a programmer.
    Anyone that could help me?
    THX!

  2. #2
    User MacKP's Avatar
    Join Date
    06-19-09.
    Location
    Duisburg (Germany)
    Posts
    211

    Default Re: Link tags

    Hi uliphant,
    i think you must build the link by your own. Look at the links on the list ore the filter whrere they are and how they look like.
    Than you can make the same linkstrukture at the reader.
    This should help you by your way: http://code.google.com/p/typolight-cata ... esTutorial

    regards
    Mediendepot Ruhr
    For real-time chat the (inofficial) Chatroom in IRC:
    -> irc.freenode.net #contao | irc.freenode.net #contao.de

  3. #3
    New user
    Join Date
    10-08-09.
    Posts
    6

    Default Re: Link tags

    Hi,
    thanks for replying. Not sure if I understand what you mean exactly. You suggest I should copy some code from the catalog_list template? So far I couldn't find a template where the tags are linked... not in the catalog_list and not in other ones. I have gone through the tutorial a few times, but exactly that is not explained... And the templates are very basic - on purpose I guess. :?

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

    Default Re: Link tags

    I think I've done something similar to what your asking about.

    On your Reader Page you have an Item that has tags that correspond to other Items in the same catalog correct?

    Here is some basic code that should get your started.

    Code:
     <?php foreach ($entry['data']['item_tagfield']['ref'] as $value): ?>
       <?php echo $value['item_name'];?>
     <?php endif; ?>
    Replace "item_tagfield" with your tag field name. and "item_name" with whatever field you use for the Item title.

  5. #5
    New user
    Join Date
    10-08-09.
    Posts
    6

    Default Re: Link tags

    YES!!!
    That was exactly what I needed. I just had to change the field names and correct a few things - and it worked. Beautiful! Thank you so much.
    For all who want to do the same, here is the fixed code:
    Code:
    <?php foreach ($entry['data']['item_tagfield']['ref'] as $value): ?>
       <?php echo $value['item_name'];?>
    <?php endforeach; ?>

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
  •