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.

Dynamic page creation revisited

August 06, 2008 12:38pm

Subscribe [1]
  • #1 / Aug 06, 2008 12:38pm

    Paul B

    241 posts

    Can this be accomplished?

    I have a client site that I will be converting into an EE site.

    Here is the basic scenerio:

    There is a section of the site that consists of rental properties

    Each property consists of a mini-section with
    • A landing page
    • A pricing page
    • A photo gallery page
    • A floor plans page
    • An additional page

    Is it possible to create a system that would allow an Admin to create a new property using a single weblog that dynamically creates the mini-section for the individual property - all five pages plus associated sub menus to navigate the property?

  • #2 / Aug 06, 2008 1:33pm

    ak4mc

    429 posts

    I should think so. You’d first have to create the required number of content fields—in addition to “body” and “extended”—for the different types of content, and then arrange them on templates to create the five pages.

    Then when a property is added to the inventory or its information changes, all of it would be handled as one entry in which any piece of content relating to it can be added or changed as needed. The new information would appear automatically on a page generated when a visitor clicks a link.

    You’d also have, I would imagine, an index page that would show links to the landing pages for each property, or the most recently listed or updated properties—depending on how you want to set up the navigation.

  • #3 / Aug 06, 2008 2:51pm

    Paul B

    241 posts

    Thanks for the reply.

    I generally understand but, I have a misfiring synapse that is preventing me from seeing something in the process.

    I recently built a site with a single weblog (with tons of information) that populates 6 separate pages to create an entire section of a site.  Which is to say, I get the basics of what needs to happen if it involves updating content on six static pages.

    Where I am getting lost is in the replication.  Once I get the basic foundation set up

    • A weblog with required custom fields
    • A main nav or links page

    and the basic property pages
    • A landing page template
    • A pricing page template
    • A photo gallery page template
    • A floor plans page template
    • An additional page template
    • Nav menus template

    I create a weblog entry for Property 1 and Property 2 that creates:

    Property 1
    • A landing page
    • A pricing page
    • A photo gallery page
    • A floor plans page
    • An additional page
    • Nav menus

    Property 2
    • A landing page
    • A pricing page
    • A photo gallery page
    • A floor plans page
    • An additional page
    • Nav menus

    etc.

    How do the internal mini-section linkages work? How do each of the templates for the 5 sub pages know what info to pull in via links? 

    Hope this explanation makes sense. I’m beginning to see the possibilities ... I think.

  • #4 / Aug 07, 2008 12:53am

    ak4mc

    429 posts

    If all of the information about a given property is contained in the same entry, the page URLs would look something like this:

    YOURSITE.COM/index.php/template_group/landing/Property_1/
    YOURSITE.COM/index.php/template_group/pricing/Property_1/
    YOURSITE.COM/index.php/template_group/gallery/Property_1/
    YOURSITE.COM/index.php/template_group/floor_plans/Property_1/
    YOURSITE.COM/index.php/template_group/more_info/Property_1/ (additional page)

    YOURSITE.COM/index.php/template_group/landing/Property_2/
    YOURSITE.COM/index.php/template_group/pricing/Property_2/
    YOURSITE.COM/index.php/template_group/gallery/Property_2/
    YOURSITE.COM/index.php/template_group/floor_plans/Property_2/
    YOURSITE.COM/index.php/template_group/more_info/Property_2/

    ...and so on.

    Your navigation links would therefore be coded into the template to take visitors to the same template group and the same entry, but to a different template. For this you would probably use segments:

    <a href="http://www.yoursite.com/index.php/{segment_1}/(TEMPLATE)/{segment_3}/">

    ...where segment 3 indicates the entry for that property. There are more relational ways of doing that so you don’t have to specify the domain and such, but that should be the gist.

    For links from your main index page listing multiple properties, you would of course use whatever path you’ve designated in the control panel as the “comment URL” and the link code would use, say

    {comment_url_title_auto_path}

    Presumably that default path would go to the landing page template.

  • #5 / Aug 07, 2008 5:06am

    Paul B

    241 posts

    Excellent. Your explanation cleared up the main issue.  I have been looking at Related Entries for another possible way to pull in specific data.

    Thanks for the tips and your time McGhee!

    -Paul

  • #6 / Aug 07, 2008 11:35am

    ak4mc

    429 posts

    My pleasure. I was just glad to see a question I could help with, and get to it before Lisa or one of the others swooped in.  😉

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

ExpressionEngine News!

#eecms, #events, #releases