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.

permalink vs regular link

February 15, 2011 10:52am

Subscribe [2]
  • #1 / Feb 15, 2011 10:52am

    Jules van Schaijik

    210 posts

    I am confused about the difference between permalinks and regular links.  Do regular links expire?  Should I spend time setting up archives from which entries can still be retrieved 5 years from now?  Or does EE automatically create archives, and moves entries into them after a certain time?

    Suppose the normal way to get to an article (with entry_id 234) is:
    http://www.domain.com/article/234

    What is the reason for creating a different permalink that looks something like this?:
    http://www.domain.com/article/archives/234

  • #2 / Feb 15, 2011 3:49pm

    lebisol

    2234 posts

    Permalink is a ‘direct’ link to your entry without having to know ID or much more about the entry. Also, you can re-use the ‘index’ of the template group without having to specify a separate entry/article viewing template. So simply put permalink has the ability to pass the entry ID.

    {permalink} 
    will produce
    <a href="http://site.com/index.php/69/">http://site.com/index.php/69/</a>

    or if you make your own link where you have to create a template group and a details template:

    <a href="http://{url_title_path={my_template_group}/view}">{title}</a>


    The reason for creating a different permalink with archive is simply organizational and the same answer to why crate folders and sub-folders on your computer. It also give you a chance to style site.com/article/archive template group and perhaps offer some listing etc.
    Hope it helps.

  • #3 / Feb 15, 2011 11:14pm

    Jules van Schaijik

    210 posts

    Thanks for answering, lebisol.  Unfortunately I am still confused.  Perhaps here is another way of asking the question: It seems as if a permalink should be more permanent (still valid five years from now) than a regular link.  But I don’t see how exactly that is achieved by using the {permalink} variable.

  • #4 / Feb 16, 2011 1:14am

    lebisol

    2234 posts

    It is not any more permanent as perhaps it is ‘direct’ or a ‘shortcut’ to an entry allowing you play to with your own URL structure and templates. Your own URLs are just as permanent.

    With {permalink} you don’t have to worry about the template structure but you give up design options and more logical URLs. So with your own structure you have to make some decisions such as:
    site.com/index.php/news/view/69
    or
    site.com/index.php/articles/read/69
    and both above imply some structure or expected hierarchy of browsing or ‘pretty urls’.
    While using {permalink} produces site.com/index.php/69 and is ‘meaningless’ to a reader.

    This is at least how I understood it so hopefully my rambling helps.

  • #5 / Feb 16, 2011 7:47am

    Jules van Schaijik

    210 posts

    Okay.  I think I’m beginning to get it.  I’ll go and experiment a bit.

  • #6 / Feb 16, 2011 3:48pm

    Ingmar

    29245 posts

    Very good. Please let us know if there’s anything else we can do for you.

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

ExpressionEngine News!

#eecms, #events, #releases