EntryPermalink in Preview

mailtonzj's Avatar

mailtonzj

17 May, 2011 02:34 PM

Hi!

There are occasions when my writers need to include a link to a not yet published entry. I thought it'd be easier for them if I include a textfield that shows the EntryPermalink when they preview the entry. However, when I do the following

<mt:if name="preview_template">
    <h4>Permanent URL</h4><mt:EntryID setvar="preview_ID">
    <textarea name="mapHTML" cols="35" rows="5"><mt:If name="preview_ID">
        <mt:Entries id="$preview_ID"><$mt:EntryPermalink valid_html="1"$></mt:Entries>
    </mt:If></textarea>
</mt:if>

I get a http://domain.com/archive/2011/05/mt-preview-**********************... instead of a permalink with the correct basename. Is there anything that I can do about this? Appreciate your help. Cheers!

  1. Support Staff 1 Posted by Jay Allen on 17 May, 2011 09:26 PM

    Jay Allen's Avatar

    Instead of mt:EntryPermalink (which is temporarily different for the preview), I think you're looking for mt:FileTemplate tag with which you can build the permalink just as MT and Melody do.

    If that's not enough to make it clear, check out this long thread where Brad Choate (lead MT engineer for years) and I explain the tag. :-)

  2. Support Staff 2 Posted by Jay Allen on 17 May, 2011 09:27 PM

    Jay Allen's Avatar

    ...and another tutorial which shows the tag in action. :-)

  3. 3 Posted by mailtonzj on 18 May, 2011 02:14 PM

    mailtonzj's Avatar

    Hi Jay,

    Thanks for the tip! I learnt a new MT tag today. :) Unfortunately, it seems that the basename becomes the weird mt-preview-************ when the entry is in preview mode. I've tried <$mt:FileTemplate format="%y/%m/%f"$>, <$mt:FileTemplate format="%y/%m/%b"$> and even <$mt:FileTemplate format="%y/%m/%-b"$> and they all give me that temporary basename generated by MT.

    Any other workarounds?

  4. Support Staff 4 Posted by Jay Allen on 30 Nov, 2011 07:02 PM

    Jay Allen's Avatar

    Hi mailtonzj. Please accept our apologies for not responding until now. I'm going through the system looking for straggler posts like this one and wanted to know if this issue is still relevant for you. If so, please let me know so I can bump it up on our radar.

    Once again, sorry to have dropped the ball. We aim to do better in the future.

    Jay Allen
    Principal, Endevver LLC

  5. 5 Posted by mailtonzj on 30 Nov, 2011 07:05 PM

    mailtonzj's Avatar

    Hi! Please don't be sorry about it. I'm already very thankful that you're
    extending your help. Yes, this issue is still relevant for me. I'd love it
    to know if you have any ways to solve it. :)

    Cheers,
    Shane

  6. Support Staff 6 Posted by Jay Allen on 30 Nov, 2011 07:56 PM

    Jay Allen's Avatar

    Okay, you're back on the queue. It may take a day or two for me to get back to you but I will try to make sure I do so this week. If you don't hear from me by the end of the week, please feel free to beat me up about it because I deserve it. :-)

  7. 7 Posted by mailtonzj on 01 Dec, 2011 03:47 AM

    mailtonzj's Avatar

    You're too hard on yourself. But thanks for your help! I appreciate it so
    much. :)

    Scotty

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac