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.

Has anyone created a template group of links?

June 28, 2007 11:57pm

Subscribe [3]
  • #1 / Jun 28, 2007 11:57pm

    stinhambo

    1268 posts

    I’m not sure if anyone else does this (or if it’s a good idea) but I created a template group called Links then individual templates only containing the link -

    <a href="http://{path=">
    __then I use an embed - __
    {embed=links/contactus}CONTACT US</a>

    I was deciding how best to create my template groups and switched them around a little and realised I had to adjust all the paths for my links so I thought, why not have them in one place and create a new template for my fixed links?

    Also you only have to remember the template instead of the template group too…

  • #2 / Jun 29, 2007 3:15am

    Willem de Boer

    142 posts

    I don’t think tis is the easiest way.
    If i want a menu, i create 1 hidden template “menu” in a template group and add all the links in it, in the way it has to be displayd. I embedd that template in all the other templates where the menu has to be displayd.

    This is the easiest way i think.

  • #3 / Jun 29, 2007 4:18am

    ExpressionEngineer

    148 posts

    also, the more you use the almighty embed, the more calls you’ll get to the db.

  • #4 / Jun 29, 2007 4:26am

    stinhambo

    1268 posts

    mmm yes true. I just wanted an easier way to keep track of all my links within the site. Especially if a client wants to link from within an article for example.

    That is a downside to EE. If only there was a popup or something that could target individual pages (although this goes against how EE works of course).

  • #5 / Jun 29, 2007 4:32am

    ExpressionEngineer

    148 posts

    well.. it’s not that hopeless.
    each weblog has a weblog path etc, and it wouldn’t be impossible at all to have popup with a generated list of uris (weblog url + entry_id or url_title) for each weblog.. something like the file browser now but for entries instead.

    (edit: spelling)

  • #6 / Jun 29, 2007 4:38am

    stinhambo

    1268 posts

    Is that the sound the cogs turning in your head Andy?

  • #7 / Jun 29, 2007 4:40am

    ExpressionEngineer

    148 posts

    LOL, nice one!

    Nah, have done it before actually. 😊

  • #8 / Jun 29, 2007 4:42am

    stinhambo

    1268 posts

    Then we should be hearing the sound of keys tapping away 😉

  • #9 / Jun 29, 2007 4:43am

    ExpressionEngineer

    148 posts

    sorry, got other things to look into 😉

  • #10 / Jun 29, 2007 10:58am

    Lisa Wess

    20502 posts

    Just to point out that if these are just links, no EE code or PHP code, you’d be much better served storing them as user defined global variables (or template type: static, though I prefer the former).  Same benefits, and easier on processing. If they’re all in one place, then you don’t really *need* the path variables, you can just write out the link, to save the processing.

  • #11 / Jun 29, 2007 1:16pm

    stinhambo

    1268 posts

    Yes that is what I thought of doing later on.

    But then again, how big or busy does the site have to be to really affect it’s performance in this way?

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

ExpressionEngine News!

#eecms, #events, #releases