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.

Create List of Weblogs

November 28, 2007 3:37am

Subscribe [0]
  • #1 / Nov 28, 2007 3:37am

    mayest

    293 posts

    Ok, I’m getting close here. This is about the last thing I want to do before I buy EE and install it on my hosting account.

    I’d like to create a list of weblogs, with URLs to the first entry in each one. I can do this with categories, but it isn’t exactly what I want and I’m positive that Google will see the result as duplicate content. Here is what I’m using:

    {exp:weblog:categories weblog="calculators" style="nested" show_empty="no"}
    <a href="http://{path=calculators/tutorial}">{category_name}</a>
    {/exp:weblog:categories}

    The problem is that creates a URL like this:

      http://localhost/index.php/calculators/tutorial/C4/

    That takes me to exactly the same “page” as this URL:

      http://localhost/index.php/calculators/tutorial/hp10b

    Obviously, the difference is at the end of the URL. I would like the one that ends in “hp10b” to end up in the URL, not “C4”.

    So, the Docs say go to Global Weblog Preferences and set URL Category Titles in Links to “yes.” But if I do that, I get this URL:

      http://localhost/index.php/calculators/tutorial/category/hp10b/

    Close, but now it has inserted /category/ into the URL string. Even worse, as I write this, that URL doesn’t work. Even if it did, that is still creating a new link for identical data.

    So, is there a way to create a list of URLs that look like this:

      http://localhost/index.php/calculators/tutorial/hp10b

    Maybe I shouldn’t be using categories at all. I’m still fumbling around, but I’m getting closer.

    Thanks,

    Tim

  • #2 / Nov 28, 2007 12:14pm

    Robin Sowell

    13255 posts

    It you want to use category name url_titles?  EE requires a ‘category indicator’ word- the default is ‘category’, but you can change that to whatever you like.  However, it is required that you have an indicator by default- EE’s urls are flexible, so it’s necessary to have some way to show that the next segment should be treated as a category url_title.

    As to whether you should be using categories?  It’s hard to say without more information.  Seems logical to me, but I don’t have a lot to go on.  Likewise- it’s hard to spot why the url wouldn’t work.

    If you want to brainstorm a bit on those issues, I can shift this down to ‘How to’ where it can be hashed out.  For the cat urls not working?  By default, it looks like it’s using the ‘calculator’ template group, ‘tutorial’ template.  So- what’s the weblog tag look like on that template?  It’s what will handle the data retrieval for the cat urls.

  • #3 / Nov 28, 2007 2:38pm

    mayest

    293 posts

    Thanks for responding. If you want to move the post, that would be fine with me. I apologize in advance for the long post. Trust me, I’ve read all of the documentation many times and something is just not clicking.

    Basically, what I have right now is a static site that contains tutorials for several different calculators. I’m trying to re-create that site using EE. I’ve been finding some of the terminology confusing, but I think I finally found a plan that works:

    1) I have a single template (tutorial) that shows the various tutorial weblogs. I have another one for the home page that only displays the home page weblog.

    2) For each different calculator (HP 10B, Hp 12C, TI 83, etc), I have a weblog. Within each weblog will be several entries that represent one “page” of the tutorial for that calculator.

    The weblog:entries tag in the tutorial template looks like this:

    {exp:weblog:entries weblog="" limit ="1" disable="member_data|trackbacks" sort="asc"}

    Note that the weblog= part is an empty string. I tried that out of desperation, and it works to show an entry from any of the weblogs depending on the URL. This may not be proper, but it is what I got to work. I couldn’t figure out any other way to display the “page” that is requested in the URL. So, if I use this URL:

    http://localhost/index.php/calculators/tutorial/hp10b

    it displays the weblog entry with “hp10b” as its url_title. If I don’t specify the “hp10b” part (segment_3, I think) then I get a blank template. That is fine for now.

    3) I also created a category group that has one category (and a few custom fields) for each calculator. The category group is called “Calculators” and I have 12 categories (HP 10B, Hp 12C, TI 83, etc).

    I may not need the category group, I don’t know. I don’t really understand what categories are used for, and the forums have confused me more. I keep running across posts that ask “should I use weblogs or categories?” It seems to me that they should be complementary, and that you should be able to reference the category info of a particular weblog. But that appears to be incorrect. Instead, it often seems that categories and weblogs are almost, not quite (somehow), the same thing.

    Sorry, for rambling. Ultimately, what I’d like to be able to do is loop through all of my calculator weblogs and create a URL to the first “page” of each one. This is to be an index of tutorials on the site’s home page. I am also very concerned about duplicate content and user confusion. Users (and search engine bots) should only ever see one URL for a particular piece of content.

    Thanks again. If I have to, I can just create the list of URLs manually, though it seems that EE is designed to avoid the need for this.

    Tim

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

ExpressionEngine News!

#eecms, #events, #releases