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.

Displaying blog entries on an Entry page (not a Template page).

December 11, 2011 1:27pm

Subscribe [2]
  • #1 / Dec 11, 2011 1:27pm

    BVUUF_MSC

    22 posts

    This question is related to a resolved thread.

    Hello,

    I recently was hired at a church in a position that updates a website using Expression Engine. Though I’ve been doing websites for about a decade I’ve never used PHP nor any type of CMS like EE before, so I’m really new to this. We’re using EE 1.7.1.

    I just tried doing the same thing as the linked thread above, but even with dynamic=“off” it doesn’t work. I’m new to PHP so my initial thought was that I couldn’t even put it there, but other snippets in the {} kind of brackets work, so I figure this can work too.

    Here is the code that I am adding to an Entry:

    {exp:weblog:entries weblog="news_and_events" start_on="{current_time format='%Y-%m-%d 00:00'}" show_future_entries="yes" sort="asc" limit="7" show_expired="no" paginate="bottom" disable="categories|category_fields|member_data|trackbacks" rdf="off" dynamic="off"}
     <h1>{title}</h1>
     {blog_post_text}
     
     {/exp:weblog:entries}

    The entry I am adding it to is here: http://bvuuf.org/index/sunday-services/this-months-services (The services are listed but that was copy/pasted.)

    I want it to look like this: http://bvuuf.org/index/news-and-events/ (But with only the upcoming services.)

    The upcoming services which I want listed in order are on this page under “News & Events”: http://bvuuf.org/

    I know I have to go in and change the entry each month anyway since we have a monthly theme, but the formatting on the services looks really odd if I just copy/paste so having it automated would be much easier.

    Thank you!

    EDIT: I made the code light gray on the This Month’s Services page to be minimally distracting to congregants and visitors until I can resolve why it isn’t working. It’s at the very bottom of the page.

  • #2 / Dec 12, 2011 1:24pm

    Dan Decker

    7338 posts

    Hi Thambos,

    Welcome to the Forums! We’ll do what we can to get you up to speed on ExpressionEngine.

    Have you made sure that the entries you wish to have displayed have an entry date that is correct? The entry date would be for the day the entry was made, by default, but this can be changed for each entry.

    If you Edit one of the entries in question, and select the Date tab, you can change the entry date. Can you double check that and let me know what you find?

    Thanks!

  • #3 / Dec 15, 2011 10:15pm

    BVUUF_MSC

    22 posts

    Thank you.

    They are for the upcoming Sundays and two Saturdays through January 1st. There are also entries going backwards a few years.

    EDIT: I should specify that it’s not that the entries aren’t showing up, it’s that the PHP code shows up instead. I grayed it out to not be distracting to people visiting the page, but if you do CTRL+A and scroll down you’ll see it.

  • #4 / Dec 15, 2011 11:50pm

    Check the quote marks in your code. They’re being displayed as curly quotes. Also, are you adding this weblog loop inside an entry? You’ll need to use the Allow EE Code plugin to do that. It might be better to include the code in your template outside of a weblog loop….

  • #5 / Dec 19, 2011 1:09pm

    BVUUF_MSC

    22 posts

    OK, thanks! But… the Allow EE Code plugin didn’t work. Now that tag is just shown in text as well. I followed the directions and it shows up in our plugins manager. Is there something else I need to do to activate it?

    Does it matter about the quote marks? They are in plain text (not curly or whatever) in the Body box, otherwise they would show up as Euro signs and stuff like that on the page you see.

    EDIT: I also have no clue how to do this in a template without it showing up on every page on the website, since I don’t know how to change what template shows up on what page, especially since I don’t know what feeds into a template (like the nav menus on our sidebar or the top image, etc.). Really we only need a way to get these blog entries on this page.

    EDIT AGAIN: Maybe I’m just confused where I put the “allow_eecode” tag? Does it go in the entry or in the template? Do I put {body} or do I put the blog code I put above inside the eecode tags? Is there a tutorial or something that explains this? I can’t find one. Sorry I’m so not getting this.

  • #6 / Dec 20, 2011 3:19pm

    Dan Decker

    7338 posts

    Hi Thambos,

    There is nothing special needed to “install” the plugin, as long as it is showing in the list, it is installed. To use it, you wrap the plugin code around the field’s tag that contains your EE code. You do this in the template that is being used to display the entry.

    It should look something similar to:

    {exp:weblog:entries weblog="your_weblog"}
     {exp:allow_eecode}
      {body}
     {/exp:allow_eecode}
    {/exp:weblog:entries}

    I hope this helps get you on your way. You can post the template code from the template you are using and I can review it for you.

    Thanks!

  • #7 / Dec 21, 2011 3:01pm

    BVUUF_MSC

    22 posts

    OK… I think I understand but it’s still not working.

    Now the template that the entry is in is:

    {embed="site/get_entry"}
    
    {exp:weblog:entries weblog="news_and_events"}
     {exp:allow_eecode}
      {body}
     {/exp:allow_eecode}
    {/exp:weblog:entries}

    That is all that is on the template. But the code for the weblog is still showing up just as code. It’s in light gray at the bottom of the page: http://bvuuf.org/index/sunday-services/this-months-services

    Do I need to put this in a different template? How do I find out what template to put it in?

    Thanks.

  • #8 / Dec 23, 2011 4:39am

    John Henry Donovan

    12339 posts

    Hi Thambos,

    Let’s confirm the plugin is installed correctly.

    The file needs to be here.

    system/plugins/pi.allow_eecode.php

    Also make sure that it is the EE1.x version you are using?

    What is the context and reasoning behind wanting to use this plugin in this way. What do you wish to show at the bottom of the page or part of each listed entry. There may be an easy maintainable way to do it via the template

  • #9 / Dec 23, 2011 3:54pm

    BVUUF_MSC

    22 posts

    We don’t have a “system” folder, there was another one like “syst3m” or something. But I don’t have my work computer with me so I can’t check the exact name. It’s installed, because it shows up in the plugin list when I’m logged in. We are using EE 1.7.1 & build: 20091002.

    I want the blog entries to feed to this entry so I don’t have to copy/paste our services each month. (It’s at the bottom of the page now only because it’s not working; I will delete everything above it once it works but we need that info there for our members and newcomers who get service information that way.) This way it will automatically update and save me the step of finding the page in the Edit tab and then pasting and reformatting. I work part-time so every step that I can eliminate helps me to have more time to get things done and finish being trained. 😊

    Sorry this is being difficult, and thanks for the help!

  • #10 / Dec 27, 2011 12:44pm

    Dan Decker

    7338 posts

    Hi Thambos,

    Would be be able to go in and get a closer look at this? If so, be on the lookout for an email from me.

    Thanks!

  • #11 / Jan 05, 2012 1:23pm

    BVUUF_MSC

    22 posts

    Hi Dan,

    I’m not sure 100% what you mean.

    I’m off of our holiday and back at work, so here’s what I’ve found. The plugin is located in this path: bvuuf.org/html/syst3m102/plugins/pi.allow_eecode.php

    It does show up on the installed list under Admin > Utilities > Plugin Manager. It says it is version 1.3.

    Onto the actual page… I don’t have the code in a template just for that page because I don’t know how to change which page uses which template yet (but I have a book on EE 1.6 so if it’s the same in 1.7.1 I can probably figure out how to do that). So the general template (labelled “sunday-services”) for all our pages in this menu is:

    {embed="site/get_entry"}
    
    {exp:weblog:entries weblog="news_and_events"}
     {exp:allow_eecode}
      {body}
     {/exp:allow_eecode}
    {/exp:weblog:entries}


    The whole page (This Month’s Services) currently reads like:

    h2. Services for December 2011
    
    ///some more headers and things///
    
    ///huge paragraphs of text and stuff///
    
    <font style (equals) "color:#DDDDDD">
         {exp:weblog:entries weblog="news_and_events" start_on="{current_time format='%Y-%m-%d 00:00'}" show_future_entries="yes" sort="asc" limit="7" show_expired="no" paginate="bottom" disable="categories|category_fields|member_data|trackbacks" rdf="off" dynamic="off"}
     <h1>{title}</h1>
     {blog_post_text}
         {/exp:weblog:entries}
    </font>

    So… Should I move the code around in the template/make a new one? Or am I missing a line somewhere? I guess I just don’t even know what’s going on anymore.

    Thanks again!

  • #12 / Jan 05, 2012 7:52pm

    Dan Decker

    7338 posts

    Hi Thambos,

    What I meant by my question was that I am offering to login to your site and help you get this sorted out. Sometimes an issue gets to a point that we want to actually log in to your site and see what is going on. I’ll send you an email with directions to send us your details.

  • #13 / Jan 10, 2012 6:03pm

    Dan Decker

    7338 posts

    Hi Thambos,

    Please let us know where you stand on the login request. I’m more than happy to go in and take a look at your situation to offer you a solution.

    Thanks!

  • #14 / Jan 11, 2012 5:13pm

    BVUUF_MSC

    22 posts

    I can’t find the login request, do you mind re-sending it? I’ll fill it out ASAP or on Friday when I’m back at work. Thank you!

  • #15 / Jan 11, 2012 5:14pm

    Dan Decker

    7338 posts

    No worries! I just re-sent it.

    Cheers!

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

ExpressionEngine News!

#eecms, #events, #releases