ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

{topic_title} in forum image attachment template

March 13, 2008 6:00am

Subscribe [1]
  • #1 / Mar 13, 2008 6:00am

    Digitalp

    13 posts

    Hi all, Sue.

    Is there anyway to have alt=”{filename}” replaced by alt=”{topic_title}” in a photo attachment to a forum thread?

    Thank you.

    ps. I am using the latest version of EE and EE-Forum

  • #2 / Mar 13, 2008 10:22am

    Robin Sowell

    13255 posts

    In ‘Thread View’- ‘Image Attachments’- what do you get when you edit to match the above?

  • #3 / Mar 13, 2008 10:41am

    Digitalp

    13 posts

    just {topic_title}

  • #4 / Mar 13, 2008 11:02am

    Robin Sowell

    13255 posts

    Looks like it’s not parsed in that template.  MIGHT could do it with php parsed on output- but I’m not dead sure how the parsing works there.  And I imagine you might run into more trouble than it’s worth.  If you want me to break this off to ‘How to’ and give you some php suggestions, I can.  Might be simple.  Or it might not.

  • #5 / Mar 13, 2008 11:08am

    Digitalp

    13 posts

    Yeah sure. Thanx.

  • #6 / Mar 13, 2008 11:26am

    Robin Sowell

    13255 posts

    Done- and… we can give this a try.  Turn php parsing on, parsed on output- in the thread view, let’s set a variable based on the topic title

    <?php
    $ttitle = '{topic_title}';
    ?>

    Then in the image attachment template, let’s just see if it works

    <?php
    echo 'Topic title: '.$ttitle;
    ?>

    May/may not.

  • #7 / Mar 13, 2008 12:27pm

    Digitalp

    13 posts

    I will try it asap.

  • #8 / Mar 14, 2008 1:39pm

    Digitalp

    13 posts

    Sorry, not parsing…

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases