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.

Using Pages Question

June 25, 2007 12:57pm

Subscribe [2]
  • #1 / Jun 25, 2007 12:57pm

    JT Thompson

    745 posts

    OK i had this in another topic but in reality it forked the thread from the O/P’s original problem.

    I have done work on my site themes. I removed all content from the index page, and am using only embeds. I split the pages up into the four following elements.

    header
    body
    sidebar
    footer

    Now, I want to use the pages module to create some static content. But if I try to use the typical index page it’s not going to work.

    I need to post this new data to a category that doesn’t display on the front page. Not a problem, I set my body page to display all but two categories because I use one for a mailbag page.

    So if I make an entry, create a page for it using pages, then post content, it’s not going to show up. why? because it’s using the same template as the main page. so the only thing that page will show is items that are allowed in the main page.

    I could create a special template, which is what I do for all one off pages. example. i use body for the front page, body_comments for the insert in the comments page. but both pages use the same header, footer and sidebar.

    So what would the best idea be here? I really want to use this.

    Here’s an example of what i mean. I created a page and the text from the publish wont show up because that template only allows items from specific categories.

    Clear as mud?

    example

  • #2 / Jun 25, 2007 1:18pm

    narration

    773 posts

    JT, I’m out of this now, as Support has gotten in with you, but left you one more reply before I noticed that, which may help.

    It’s here.

    Kind regards,
    Clive

  • #3 / Jun 25, 2007 1:30pm

    narration

    773 posts

    Ok, had to be one more, as I corrected the example.

    Because:  the show_pages is actually used in the ‘entries’ tag, that’s all.

    Here.

    Best again,
    Clive

  • #4 / Jun 25, 2007 5:56pm

    Lisa Wess

    20502 posts

    OK i had this in another topic but in reality it forked the thread from the O/P’s original problem.

    I have done work on my site themes. I removed all content from the index page, and am using only embeds. I split the pages up into the four following elements.

    header
    body
    sidebar
    footer

    Now, I want to use the pages module to create some static content. But if I try to use the typical index page it’s not going to work.

    Why not? Your normal entries use the index page, right?

    I need to post this new data to a category that doesn’t display on the front page. Not a problem, I set my body page to display all but two categories because I use one for a mailbag page.

    As pointed out, you can use the show_pages parameter, you needn’t use a special category.

    So if I make an entry, create a page for it using pages, then post content, it’s not going to show up. why? because it’s using the same template as the main page. so the only thing that page will show is items that are allowed in the main page.

    I don’t really understand this.  I don’t know what code your index page is using, of course, so you may be right.  But depending on the weblog entries tag, it should work

    I could create a special template, which is what I do for all one off pages. example. i use body for the front page, body_comments for the insert in the comments page. but both pages use the same header, footer and sidebar.

    So what would the best idea be here? I really want to use this.

    I personally use a template (dem/info) to siphon my pages through.  This is formatted a bit differently (no comments, wider view, no meta data as such like my normal entries use).  But that’s certainly not the only way.

    Here’s an example of what i mean. I created a page and the text from the publish wont show up because that template only allows items from specific categories.

    Clear as mud?

    If you need to restrict your front-page index like that, then yes, you probably want a dedicated template for pages - or many, if you want different designs for different pages.  Just like the weblog entries tag this is incredibly flexible.

    What about your example poses a problem here?

  • #5 / Jun 25, 2007 8:41pm

    JT Thompson

    745 posts

    Thanks everyone, I’ll read through this and see if I can figure it out.

    I must confess. For the last few months my brain hasn’t been working right. I am having extreme difficulty with reading comprehension. This makes reading a response to my problem very difficult. It’s almost like I forget things as soon as I read them.

    ANyway, I’ll read through this and I really appreciate the help.

    I think i’m going insane.

  • #6 / Jun 25, 2007 9:03pm

    Lisa Wess

    20502 posts

    I suffered that for the entire time I was back at University study….. =)

  • #7 / Jun 25, 2007 9:10pm

    JT Thompson

    745 posts

    haha.

    Well i actually do have huntington’s disease and this is a side affect. I wish it were from college, I could ignore it 😊

  • #8 / Jun 25, 2007 9:11pm

    Lisa Wess

    20502 posts

    Sorry to hear that, JT. :(  If you need me to try to re-phrase or anything, let me know, or if you have other questions.

  • #9 / Jun 25, 2007 9:17pm

    JT Thompson

    745 posts

    Oh it’s not that bad. lol. I’ve got another 10 years before it gets worse. Most of it is just frustration. I’ve always been restless and have trouble focusing.

    I’m not real clear here though. It seems like Sue’s option might be best. but I’m not sure I understand something.

    The weblog:entries on the front page will gather posts from ALL categories unless it’s specifically told not to, correct? And if I understand the other item she said, to follow that route, I’d create another template like my index, but use a different embeded template for the body. Then create that body to display whatever I want to show up in my ‘pages’ URL correct?

    So does my answer make sense?

    Also, do you have a suggestion on how I should be addressing the weblog:entries? I mean right now I’m using this to keep from showing that category: category=“not 6”

  • #10 / Jun 25, 2007 9:59pm

    Lisa Wess

    20502 posts

    I’m not quite followin the embedding.  Basically the weblog entries tag is what delivers information - how you get that into the template doesn’t really matter that much.

    What category? Why do you want to not show 6, what’s in it that’s so bad? =)

  • #11 / Jun 26, 2007 12:01am

    JT Thompson

    745 posts

    Let me see if I can explain.

    The way I managed to complete this was by copying the index template. in the copied template I changed only the body embed and changed it to body_about.

    Then I created a new template called ‘about’.

    I had to also create a new category because I don’t want anything I’m putting in this page to show up on the index of the site.

    Then i had to make an entry that was bogus. it’ll never bee seen. put it in the new category, and on the pages tab, type in my URI.

    So while I love the fact I can use this for a URL: http://www.hillaryproject.com/?/about/, I have to assume I’m doing this wrong. I just created a blank template and filled in the content. There is no calls to weblog entries. That’s why it makes no sense to me to use a publish page to do this.

  • #12 / Jun 26, 2007 12:15am

    Lisa Wess

    20502 posts

    Er, ok.  The pages module uses the weblog entries tag. 

    So, lets do this at its most basic.

    Create a totally blank template, put only this in it:

    {exp:weblog:entries weblog="default_site" limit="1" rdf="off" disable="trackbacks"}
    <h2>{title}</h2>
    <p>{body}<br />
    {/exp:weblog:entries}

    Now, create a Page, any page.  Oh, for giggles lets call it “wolves rock”.  (which is truth =) ).

    Now, put in any URI.  Lets say

    /animals/canine/feral/wolves/

    Lets say you created the above template in the “site” template group and called it “animalia”.  Now for the page template - choose site/animalia.

    Great.

    Now, go to http://www.example.com/index.php/animals/canine/feral/wolves

    And you get this (<—I followed my own tutorial and made it public)

    See how that works? Style as you want, use that template for whatever pages you want, set the URL as needed.  It works with any template that has a weblog entries tag in it, as long as you haven’t specifically restricted that weblog entries tag from showing pages.

  • #13 / Jun 26, 2007 5:54am

    narration

    773 posts

    Hi JT,

    Looks like you figured a way to get pretty much what you wanted - and the result looks great.

    If you still want to work out the Pages way also, there’s an answer I made to Lisa on the other thread this morning that might help, but I like even better her good example here about the wolves.

    Will put a few comments here in case you want to try that.

    - the advantage of using an entries tag setup in your new about_body is that it would allow you to use your new ‘about’ template set for any Pages static content.  The about_body entries tag would be like Lisa’s in the wolves example. 

    - if you used the entries-based method, you’d set the ‘about’ template in the Pages tab when Publishing, along with the page path you wanted.

    - you used a new category to keep things straight for your own method.  If you went the entries route, you could do this by putting show_pages=“only” in the entries tag of your new body_about template.  You would similarly set show_pages=“no” in the entries tag of your original body template.

    - well, I think that’s about it, actually.  Good!


    JT, I’m also sorry to hear about the Huntingtons, but I’m pretty impressed with your attitude and spirit.  And how you worked out your own solution for this problem also.

    I learned what this was about in an early ‘side career’ as a folk singer, and found how much Woody Guthrie did.  Today I had a look at the NINDS page, and as with my nephew’s schizophrenia (he’s one of those who does very well, through the new meds and his thoughtful effort), it’s something the new genetics research clearly has an opportunity to affect, as they proceed step by step.  You know about all this, am sure.

    Take care, then, and thanks for letting us have the chance to learn something from you.  It’s valued.

    Best regards,
    Clive

    Let me see if I can explain.

    The way I managed to complete this was by copying the index template. in the copied template I changed only the body embed and changed it to body_about.

    Then I created a new template called ‘about’.

    I had to also create a new category because I don’t want anything I’m putting in this page to show up on the index of the site.

    Then i had to make an entry that was bogus. it’ll never bee seen. put it in the new category, and on the pages tab, type in my URI.

    So while I love the fact I can use this for a URL: http://www.hillaryproject.com/?/about/, I have to assume I’m doing this wrong. I just created a blank template and filled in the content. There is no calls to weblog entries. That’s why it makes no sense to me to use a publish page to do this.

  • #14 / Jun 26, 2007 6:10pm

    Lisa Wess

    20502 posts

    As a note, I have gone ahead and added this to the wiki.

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

ExpressionEngine News!

#eecms, #events, #releases