default userpic

Linking between entries or pages

Vote 0 Votes

I know this is going to sound like a newbie question, but is there a better way to link between pages (or entries for that matter) without adding the full path?

For example, I know I can easily do something like the following...
Learn More

But I'd rather be able to include MT tags in an page/entry field such as:

This is a paragraph etc. If you want to know more ">Go Here

It's more like a wiki functionality. Perhaps there's a plug-in that makes this easier? I tried webiki and it didn't install due to a database error.

Reported on Movable Type 4.2

11 Replies

| Add a Reply
  • Dear Brian,

    You may like to further detail what you mean with the above...

    Cheers,
    Mihai

  • default userpic

    It might have made more sense if the HTML in my post was show as the code and not as actual links.

    What I'm looking for is a way to link pages or entries within the Movable Type site / blog to each other without actually putting in the relative or full paths. I know how to do all that stuff with templates modules and widgets etc.

    The reason is I'm looking for a way to make it easier for editors to reference other pages from the edit pages.

    For example, say someone was writing and entry or a page and they wanted to include a link to the the "about us" page. Sure it's simple enough to just put the full url to the page and link it in the entry, but I need the links to stay relative and putting a relative path like http://../../file.html could break later too.

    What would be cool is if one could put the equivalent of MT tags in entries like mt:Link or mt:BlogUrl etc.

    Thanks
    +bm

    • So you want MT to generate relative URLs on every archive for these link? I could see merit in creating a system for referencing other posts by shorthand notation. Is that what you are asking for or is it just a regular link insertion dialog type function that tells MT to generate relative URLs?

  • I'm pretty much in the same boat or a "related" boat (ha)... Trying out MT again after about a 7 year hiatus. I like what I see, BUT...

    I need *all* links in what is published to be relative. It completely befuddles me why this seems so complicated. Relative links in many cases increase flexibility. In my case, I'm looking for a bit of a "redirect" or "proxy" solution where I show my blog in one frame whose source is on a totally different site with two IPs: one internal and one external. Relative links would totally solve my problem.

    I've discovered mt:BlogRelativeURL. I need something similar for mt:Link and there doesn't seem to be.

    Thanks!
    /pj

    • Well, it's just easier to use absolute URLs since they wouldn't ever need to be recalculated based on the current page. There is a justifiable use case for what you are asking for, but I fail to see where the flexibility is.

      • I'm probably not completely up to speed yet with the generation and recalculation aspects of MT yet, so it's hard for me to comment within the MT sphere of things how that might be a drawback, but... From a flexibility standpoint, as I wrote in another thread (in what ended up being a bit of a diatribe that wasn't necessarily intended), there are LOTS of situations in which relative URLs provide flexibility from the publishing and hosting standpoint.

        If I publish "/myblog/blah/blag" versus "http://myserver/myblog/blah/blah/blah" (and "/images" versus "http://myserver/images", etc.) there are LOTS of situations where this totally eliminates headaches or even any republishing I would think.

        Someone in another thread is having a killer of time converting to SSL due to absolute URLs with the "http" versus "https" protocol issue. I can understand that totally. I feel their pain. Relative URLs eliminates that pain. A few other scenarios:

        * Port Forwarded IPs. This is my issue. I'm only publishing to one physical server but that server can be accessed from two different IPs -- one external and one internal. This is a very, VERY common scenario for companies and is becoming more of a viable scenario for home and SOHO users. Relative URLs would instantly solve my current dilemma. Publish once; see from both IPs.

        * Certain proxying scenarios (eg. via Apache proxy).

        * Load balancing situations. Absolutely. (Whoops. I mean "non-absolutely"!!)

        * Redirects based on mixed SSL and non-SSL content.

        * Host name changes or even rehosting the content. I guess, sure, you can reset your Site URL setting and regenerate. Not a huge deal, but with relative URLs -- no need to republish anything. Change the physical server, change the hostname... no problem.

        Apache itself is loaded with all kinds of options for managing incoming connections, but few to none of them can be taken advantage of with absolute URLs. I mean, relative URLs are super flexible. I'm probably leaving out some other scenarios which absolute URLs break.

        I'm hoping there is a solution for $mt:Link like $mt:BlogRelativeURL is for $mt:BLogURL. If not, I'm either going to have to put together an output filter on Apache, or do some kind of DOM kludge in Javascript where I run through all the links after a page load and strip the protocol and host name and make the links relative.

        Hopeful,
        /pj

  • default userpic

    I'd even be happy if I could link things using individual IDs, but the edit interface doesn't recognize MT tags.

    Mike T's point pretty much sums up what I had in mind. Think of pages / entries being treated like assets - once uploaded / entered they can be inserted into other pages /entries and stay relatively linked within the Movable Type system as opposed to a directory path or URL.

    Perhaps there's a plug-in that already does this that I'm not aware of. However after extensive searches I haven't found it.

  • default userpic

    I'm not really making the case for flexibility, but rather ease of use for authors.

    I'm sure we've all been asked by a client, "how do I link to another page or entry that I created?" "Just copy and paste the URL" works for most, but then there are those who think it doesn't make any sense. I assume it's because they tend to perceive the system as a collection of documents and content blocks not links and paths. The other case is they might want to include something in-line such as a recurring form element between paragraphs.

    Admittedly this could be two different solutions.
    1) the ability to link to pages / entries relative to the Movable Type system within entries. The result would almost be something like (mt:permalink id="30" / title="foo").

    2) the ability to insert widgets or template modules inline / inside an entry without have to edit a template.

    For a power user, it's like a persistent include within an entry. This would help in big sites, especially ones with lots of repetitive products where the content needs to actually appear inside the PageBody / EntryBody and copy and paste isn't manageable.

    • One problem you'd run into with point 1 is that it is dependent on ID numbers. If someone exports their database and reimports later, there is no guarantee that they'll get the same IDs, and then they'll have a lot of broken links.

    • Come to think of it, you could always use this tag modifer to make the contents of the PageBody and EntryBody tags get evaluated. That would allow you to use Entries and EntryPermalink to load a particular entry by ID and then create a permalink to it.

  • default userpic

    Hmmmm. That just might be the thing I'm looking for.

    Thanks for pointing that out!

    bm

Add a Reply

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

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012