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.

Pages Module Question

March 08, 2008 1:05pm

Subscribe [2]
  • #1 / Mar 08, 2008 1:05pm

    Sceneshift

    39 posts

    Just a quick one…

    Is it ok to use pages a lot? For example, I have a weblog of about 1000-2000 entries and I would like use pages for each entry.

    Is there a reason why I should not do this? Or am I ok?

  • #2 / Mar 08, 2008 1:52pm

    oldgoldblack

    113 posts

    Wow, no, I wouldn’t recommend that. First of all, because it will take you forever. Secondly, pages weren’t meant for short, dated content. They were meant for permanent-like pages that need to be changed by hand occasionally. EE is a flexible enough CMS that you can use these things however you want, but it seems like there are better choices, unless you have a specific reason for doing that.

    Why not migrate your entries into an EE weblog instead?

  • #3 / Mar 08, 2008 2:00pm

    Sceneshift

    39 posts

    Ahh. Well my entries are a weblog… perhaps you can help me out here since I am little new to EE.

    I have a weblog (locations) assigned to the template (also locations) http://www.mysite.com/locations/ lists our all the entries in the weblog, and when you click one, I want to be able to show that data in a NEW template. This works fine, but it means I have to add /view/ to the url string (http://www.mysite.com/locations/view/location_entry) and I would much rather cut out the /view/ part… so I get http://www.mysite.com/locations/location_entry.

    Can you suggest how I would achieve this?

  • #4 / Mar 08, 2008 2:11pm

    oldgoldblack

    113 posts

    Ah, yes. There is an easier way to achieve this effect. You’re going to combine the templates into one, and use conditionals to tell it whether to use the “hey this is the list of locations” code or the “hey this is a location” code.

    You can use URL segment variables to do get your one template to figure out which is which. See maadmac’s note on that doc here.

    Good luck! And welcome to EE! I think you’ll find it quite capable of most anything if you can figure it out, and a great community to help along the way.

    :coolsmile:

  • #5 / Mar 08, 2008 2:17pm

    Sceneshift

    39 posts

    Thanks very much!

    I assumed you could do it inside a conditional statement, but I’d much much much rather use a separate template for organizational purposes (the two pages both have a lot of code, and are very different in style)

    I suppose I’ll just have to lump that extra segment :(

    Thanks again

  • #6 / Mar 08, 2008 2:25pm

    oldgoldblack

    113 posts

    There’s a solution for that too. You can embed a “list” template and a “location” template inside a simple master template that has only that URL segment conditional statement and the embeds in it.
    http://expressionengine.com/docs/templates/embedding_templates.html

  • #7 / Mar 08, 2008 2:37pm

    Sceneshift

    39 posts

    Works a treat!

    Thanks!

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

ExpressionEngine News!

#eecms, #events, #releases