We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23849
    • 223 Posts
    thefutureforward Reply #1, 16 years ago
    Hi All,

    I’m wanting to include my tag list for a specific ditto blog article on the actual blog article page. I just need the tags I’ve associated with that article to display as links but I can’t seem to figure it out (I was thinking I may need to do another hacked up ditto call on the blog article page itself, but think there should be a better way).

    Let me know, thanks!
      Nick Hoag
      Creative Partner
      The FutureForward

      http://thefutureforward.com
      • 27672
      • 168 Posts
      slush puppie Reply #2, 16 years ago
      i wrote a little snippet to do this. here is the call:
      <strong><em>Tags:</em></strong> [!almanacTags? &tags=`[*almanacCheckboxTags*]` &landing=`132`!]

      and here is the snippet (’almanacTags’):
      <?php
      $output = '';
      $landing = (isset($landing)) ? $landing : 0;
      
      if(isset($tags) && !empty($tags)){
       $tag = explode(",", $tags);
       foreach($tag as $t){
        $output .= '<a href="[~'.$landing.'~]?tags='.strtolower($t).'">'.$t.'</a>, ';
       }
       $output = substr($output, 0, strlen($output)-2);
      }else{
       $output .= 'None';
      }
      
      return $output;
      ?>

      it’s simple, but it seems to get the job done
        • 23849
        • 223 Posts
        thefutureforward Reply #3, 16 years ago
        Slush Puppie, you are a god amongst men. Amazing!
          Nick Hoag
          Creative Partner
          The FutureForward

          http://thefutureforward.com
          • 18367
          • 834 Posts
          Hi,

          tried to adapt this for my own blog and couldn’t get it to work.

          Do I need to change anything in the snippet code?

          Thanks

            Content Creator and Copywriter
            • 16278
            • 928 Posts
            In the above snippet, $tag = explode(",", $tags); implies that the tagging TV is using the delimited list widget with a comma as delimiter to format its output. Otherwise the tags just run into each other when they are output.

            The landing page needs a Ditto call including the &tagData parameter to tell it where to the tags live.
            smiley KP
            (More on tagging at http://www.pogwatch.com/ditto/ditto-extenders/ditto-tagging.html)
              • 18367
              • 834 Posts
              ooh kay,

              I’m using a checkbox so I changed one comma to a pipe. (Do I need to change both commas
              ",",

              Half worked but the result just says None. Which is better than before when it was saying wrong chunk

              Here’s the call

               [!postTags? &tags=`[*postTags*]` &landing=`0`!]


              Things I’m still not sure of

              What does the & landing = mean and

              what should the &tagData be?

              THanks
                Content Creator and Copywriter