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.

Entry connected template/page creation

January 13, 2012 1:36pm

Subscribe [2]
  • #1 / Jan 13, 2012 1:36pm

    Reverie123

    47 posts

    So I have created a workflow for my client’s site using EE, but I am not quite sure if I am doing it the right way or the most efficient way. I tried to make it as simple for my client as possible and boiled page creation down to two steps.

    Client Workflow:

    1. Create an entry for a desired page.
    2. Create a new template with the same URL_Title as that entry, and then base the template on my pre-created template.

    Voila, you have a page populated by the past entry.

    How this works is that I create a base template with the entry channel information the user will be inserting. I also base the channel search on the URL segment (e.g. site.com/segment/segment 2), if the segment name matches the URL_title of the template then populate the template with the correct information.

    Am I making this more difficult then it is? Is their a method where I can make it one step (e.g. client creates entry, page done)? Any Suggestions? (note: client has no experience with html/css/js)

     

  • #2 / Jan 14, 2012 8:57am

    e-man

    1816 posts

    So I have created a workflow for my client’s site using EE, but I am not quite sure if I am doing it the right way or the most efficient way. I tried to make it as simple for my client as possible and boiled page creation down to two steps.

    Client Workflow:

    1. Create an entry for a desired page.
    2. Create a new template with the same URL_Title as that entry, and then base the template on my pre-created template.

    Voila, you have a page populated by the past entry.

    How this works is that I create a base template with the entry channel information the user will be inserting. I also base the channel search on the URL segment (e.g. site.com/segment/segment 2), if the segment name matches the URL_title of the template then populate the template with the correct information.

    Am I making this more difficult then it is? Is their a method where I can make it one step (e.g. client creates entry, page done)? Any Suggestions? (note: client has no experience with html/css/js)

    I think by now you’ve gathered that if you need to create a new template every time an entry is created, that’s not very efficient 😊

    What you need to do is create a single templategroup (say, article) and use the index template for your article. (alternatively, add a template to an existing template group and use that, of course. Only the segment used will change).

    The main channel entries loop inside that template would be something like:

    {exp:channel:entries channel="your_weblog" disable="categories|member_data|pagination" url_title="{segment_2}"}
    content here
    {/exp:channel:entries}

    Your URLs will now look like mysite.com/index.php/article/url_title and that 1 template will happily generate any published entry. Makes sense?

     

  • #3 / Jan 17, 2012 1:32am

    Reverie123

    47 posts

    Thanks, it worked! I knew I was wrong, but the examples confused me on the site.

    For a follow up on that question, lets say I am making a profile-ish page for someone (via this method). The initial entry fills the page with static information (e.g. name, description, etc) but how can I add the more dynamic information (photos, songs, listed items) separate from the main entry?

    Would this be done by creating an entry solely dedicated to adding those items (photos, songs, etc)? Would this be done via category meaning creating a list of profiles linked to the entry? Anyone have any suggestions? I am not sure how to approach it, any help would be greatly appreciated!

  • #4 / Jan 17, 2012 7:34am

    e-man

    1816 posts

    Hmm, there’s several ways of doing this, it depends on what exactly you’re trying to achieve.
    There’s no direct relation between your channels and templates so one template can display content from different channels.

    If you’re looking to relate data from different channels with each other have a look in the docs at:
    http://ellislab.com/expressionengine/user-guide/modules/channel/relationships.html
    or (for more advanced relationships) and add-on like Playa:
    http://pixelandtonic.com/playa

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

ExpressionEngine News!

#eecms, #events, #releases