Multiple Display Helpers?

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  tokyograph 3 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #162214

    logikal16
    Member

    It’s possible using PHP (you can use PHP in templates). Not sure about the Magic Tag approach though.

    <pre>
    <?php
    $img = $this->pod_helper(‘image_helper’, $this->get_field(‘image.guid’));
    $img = $this->pod_helper(‘some_other_helper’, $img);
    ?>
    </pre>

    More information: http://pods.uproot.us/codex/pod_helper

    #162215

    watts
    Participant

    thanks for the help! ill putz with it asap.

    #162213

    watts
    Participant

    Is it possible to pass data through multiple display helpers?

    I have a POD column that accepts multiple images, putting them into an array. I then pass that array through a display helper
    <pre>
    {$event_more_images.guid, image_helper}
    </pre>

    image helper is this::
    <pre>
    <?php
    if (is_array($value)) {
    foreach ($value as $image_data) {
    echo "<img src=’$image_data’ />n";
    }
    }
    ?>
    </pre>

    this allows me to display the images, which is great! but i would like to output those .guid values and pass them through another display helper [the image-sizes display helper provided in packages], that way i can display the thumbnails of those values, and then link the thumbnails to the actual images.

    so to essentially pass the $image_data value through image_thumbnail helper.

    is this even possible?

    #162216

    tokyograph
    Member

    I will probably upload a package in the near future to make this simpler, since I’m doing it too for a site I’m working on.

    I’m passing the image array to the helper rather than the guid, and the helper looks like:

    <pre>
    <a href="<?php echo $value['guid']; ?>" title="<?php echo $value['post_name']; ?>" rel="lightbox"><img src="<?php echo wp_get_attachment_thumb_url($value['ID']); ?>" alt="" /></a>
    </pre>

    (The rel="lightbox" is in there because I’m also using a jQuery lightbox for the gallery.)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Wordpress Cloud Hosting