Aron

Custom fields and images

Vote 0 Votes

Apologies for trashing the boards this evening... I've looked everywhere online and can't seem to find a working solution.

I have a custom field set as an image - when trying to display this on my templates it simply presents me with a View Image link as opposed to the image or an URL to it.

Is it possible just to extract the URL of the image so that I can enclose it within my own image code.

Thanks!

Reported on Movable Type 5

1 Reply

| Add a Reply
  • Hi Aron,

    Yes, that's possible.

    Assuming that your custom image field uses this tag "MyCustomImageField", you would have to code it like this:

    <mt:If tag="MyCustomImageField"><mt:MyCustomImageFieldAsset><mt:AssetURL></mt:MyCustomImageFieldAsset></mt:If>

    You could replace the tag "mt:AssetURL" with "mt:AssetThumbnailURL".

    Also, you will have to replace "mt:MyCustomImageField" with your image custom field tag.

    Kind Regards,
    Mihai Bocsaru

    ----------------------------------
    Daily Movable Type Consultant

    Web Development
    Movable Type Consulting
    Six Apart Partner

    http://www.pro-it-service.com/
    ----------------------------------

    Movable Type Demo
    http://www.movabletypedemo.org/

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

code.sixapart.com

141 498

Last Topic: Action Stream for LinkedIn by michael webster on Jan 10, 2013

254 907

Last Topic: Auditors in India by dimpi on May 3, 2013

1873 6643

Last Topic: Main Index Template by Richard on May 7, 2013

89 311

Last Topic: Seeking explanation of files and folders by CosmicKnight on Feb 23, 2013

1520 5507

Last Topic: Is there a way to edit the head element on a post-by-post basis? by jmcg8888 on May 7, 2013

743 3152

Last Topic: Installation Problem by Alex L on Apr 2, 2013

90 334

Last Topic: HELP! I need to 301 over 100 urls on my site via htaccess by justin on Feb 22, 2013

193 801

Last Topic: Deleting Revision History by Will Haynes on Mar 16, 2013

28 97

Last Topic: Movable Price by joe22 on Jan 10, 2013

51 222

Last Topic: Phone App by Duane Langshaw on Apr 3, 2013

65 249

Last Topic: Expanding new rich text editor and implementing table function by Takeshi Nick Osanai on Jul 30, 2012