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.

Templating problems

March 20, 2009 11:41am

Subscribe [1]
  • #1 / Mar 20, 2009 11:41am

    Hello,

    I am having a little problem on my templating, here it comes:

    
    
    

    I did my best translating the most importent parts, but some dutch is still in there, hope you don’t mind.

    The idea is, that in the first column a small menu shows, this menu is based on the second segment in the url and is builded up from the contents of a category, for example “partners” is a category and all our partners should show up in the menu. But when I post anything with as title “company” the left menu is gone and the content comes up in the cells next to it.

    I tried everything, but am not very experienced in expression engine, that’s why most of it is written in PHP.

    Any help would be more than welcome!

  • #2 / Mar 20, 2009 12:23pm

    Boyink!

    5011 posts

    I’d recommend holding off on further developing this template until you learn more about EE. 

    EE has built-in segment variables and conditionals, but more importantly the weblog entries tag set is “smart” in that they, by default, can read the URL and pull the appropriate entries (like all entries belonging to the category being displayed in the URL).

    In other words, you’re sort of forcing EE to work in a way that it inherently—by default - works anyway.

    I’d recommend exploring the EE doc around:

    Segment variables, Conditionals and working with the weblog:entries tag and categories.

  • #3 / Mar 20, 2009 12:40pm

    Thanks for the fast response, boyink!

    From what I understand, you are saying I should leave the PHP and start working from the EE-tags?

    I understand that, but it’s not like i’m doing this because i want to learn on and on about EE.
    As a matter of fact, we’re walking to a deadline here.

    I am going to wait for other responses ‘till monday and then will make my decision on what to do next.

    thanks again for your help.

    any other reactions would be welcome as well.

  • #4 / Mar 20, 2009 2:14pm

    Boyink!

    5011 posts

    Thanks for the fast response, boyink!

    From what I understand, you are saying I should leave the PHP and start working from the EE-tags?

    Yes - I have a feeling what you are trying to do is very straightforward in EE.

    Do you have a screenshot - or possibly just a better description of page you are trying to build?

  • #5 / Mar 21, 2009 10:40am

    What i am trying to accomplish aín’t very hard.

    We have 6 categories (Home, company, possibilities, markets, services & relations), in these categories we have around 6 entries each, except for Home, because that represents the homepage.

    now what we have is a menu (as you can see in the code above) which works perfectly and included that in every page.

    now, If segment2 says company, i want to display a overview (in the first column) of all entries in the categorie company.
    And Expression engine should get the content of entry “company” and put that in the page(in column 3 & 4 and 5 & 6).

    The thing what makes this code even more complex is the fact that we have multiple weblogs with there own custom fields, we used the if statements of expressionengine to see whether to check which one is used(this works fine).

    Now i think of it, I think It should be possible to build this in expression engine tags and it would save a lot of php. However I do not understand why this code doesn’t work and i would really like to know that.

    [edit]anyone?[/edit]

    Thanks for your response, again, it was quite a good idea to write everything down for a moment and re-think everything.

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

ExpressionEngine News!

#eecms, #events, #releases