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.

Entry output from template

July 28, 2011 10:45am

Subscribe [0]
  • #1 / Jul 28, 2011 10:45am

    Pauly

    16 posts

    Hey all, wondering if anyone can help me drive entry pages from my template. I have setup a custom field called {article} which I can call successfully in my template. The output looks something like;

    One
    Two
    Etc.

    Having associated a thumbnail image which I have successfully called on the homepage, on the single-entry page I want it to be embedded within the first paragraph. But within the template, the closest I can get is this;

    {if thumb != ""}{lead-thumb}{/if}
    {article}

    Which outputs;

    lead-thumb.png
    One
    Two
    Etc.

    So my question is how do I force the desired output below from my template?

    lead-thumb.png One
    Two
    Etc.
  • #2 / Jul 28, 2011 12:09pm

    Pauly

    16 posts

    Managed to do this using PHP substrings to replace the next 3 characters. Probably not a perfect approach but it works.

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

ExpressionEngine News!

#eecms, #events, #releases