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.

Category: How to control what's on this page?

July 20, 2007 7:02pm

Subscribe [3]
  • #16 / Jul 31, 2007 7:34pm

    James Prickitt

    77 posts

    OK now i’m just trying to start over. screwing with everything. God I didn’t expect the learning curve to be this high.

    - Custom category fields still not being output.

    - New weblog, same categories

    - Default template that comes with EE

    - Named the weblog “pages” and the templates “content”

    - path.php: took out the global variable setting the weblog and template group.

    This is the .htaccess:
    RewriteEngine on
    RewriteCond $1 ^(weblog|blog|trends|content|member|search|blog|management|emedikon|blog1|site|P[0-9]{2,8}) [NC]
    RewriteRule ^(.*)$ /index.php/$1 [L]

    - Looks like a category/topic needs to be at:

    http://www.medicalpracticetrends.com/content/topic/business-growth/

    - Path Settings: correct?

    Blog URL
    http://www.medicalpracticetrends.com/

    Comment Page URL
    http://www.medicalpracticetrends.com/pages/comments/

    Search Results URL
    http://www.medicalpracticetrends.com/pages/search/

    Trackback Return URL
    http://www.medicalpracticetrends.com/pages/comments/

    Ping Return URL
    http://www.medicalpracticetrends.com/pages/comments/

  • #17 / Jul 31, 2007 7:41pm

    James Prickitt

    77 posts

    Do I have to specify something because it’s the second website in MSM?

  • #18 / Jul 31, 2007 7:47pm

    James Prickitt

    77 posts

    I just copied over my template from the site that works and pasted it in.

    Doesn’t work. WTF?

  • #19 / Jul 31, 2007 7:52pm

    e-man

    1816 posts

    I’d lose all the mod-rewrite stuff as well as Boyink suggested and really start with a bare-bones page, add complexity and see where it goes wrong.
    When using categories EElooks for info in the URL so that’s probably what’s causing the problem here. Remember: debugging is a process, first eliminate as many variables as possible.
    Good luck!

  • #20 / Aug 01, 2007 6:42pm

    James Prickitt

    77 posts

    OOOOOOOOOOkay

    So I deleted everything, started over:

    ( Advice to everyone: First, Upgrade to the latest build, maybe that fixes it…  Is there an email announcement list that tells me when there’s a new build?  )

    So now I do see custom category fields when I use this:

    <pre><code>
    {exp:weblog:categories weblog="weblog"}
    Custom Field Here: {category_custom_field}
    {/exp:weblog:categories}
    [/code}

    But that shows a big list of all of them. What if I want just the one in the URL?

    To specify one I can do:

    <pre><code>
    {exp:weblog:categories weblog="weblog" show="33"}
    Custom Field Here: {category_custom_field}
    {/exp:weblog:categories}
    [/code}

    - where 33 is the category code.

    But how about showing the info for:

    /categories/management/

    where management is the category?

  • #21 / Aug 01, 2007 7:34pm

    James Prickitt

    77 posts

    In short, do I get the URL to tell the index template what category to show?

    How?

  • #22 / Aug 01, 2007 9:01pm

    e-man

    1816 posts

    In short, do I get the URL to tell the index template what category to show?

    Glad to see things are slowly improving, hang in there James 😊
    I think you need to look at the path parameter.

  • #23 / Aug 03, 2007 6:01pm

    James Prickitt

    77 posts

    So according to that doc, in the template I have:

    {category_name}

    and it outputs an URL I expect:

    blah.com/topic/management/

    But when I get to it, no posts from that category show up—none show up. How do I get them to show up? Change the URL or something else?

    * Note that this is the same file for the home page BUT on the home page I do show recent posts.

    Another question:

    For custom fields, (unless I use show=“32” specifically) it gives me a whole list. How do I limit EE to outputting ONLY that category’s? I assume I need to tell EE what category to use, but how come EE doesn’t know that from the URL?

  • #24 / Aug 03, 2007 6:17pm

    James Prickitt

    77 posts

    OK, an improvement to report. But I still have the main issue:

    My remaining question:
    - How do I get the custom fields for just the “current” category?

    - Hard-coding show=“32” works, but omitting it lists all categories. I need to tell it to use the current category somehow?

    - If EE doesn’t get the category from the URL, I would expect a tag like show=”{cat_id}” ?

    ———————————————————————————————————
    What I did get to work:
    Yay! (argh) The posts I expected to show up had no category assigned to them, because in this debugging process I deleted everything and started over. Then didn’t add a category.

    Take-aways from this:

    - Use style=“linear” in your weblog:categories tag.

    - With Multiple Site Manager, MAKE SURE you are using the right blog in the right site. If you have blogs named the same you can get tripped up.

    - Check that new entries have categories

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

ExpressionEngine News!

#eecms, #events, #releases