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.

Categories?

July 02, 2007 6:30pm

Subscribe [2]
  • #1 / Jul 02, 2007 6:30pm

    Zizzyx

    4 posts

    I purchased the 30 day hosted demo and played around with it for a few hours. I did the tutorial in the user guide and that helped me understand the whole template system. I am still having a problem wrapping my head around a few things.

    I created a weblog named layouts and created the custom fields and assigned it to that weblog. I also created a category group called Layouts and assigned it to that weblog. In the Layouts category group I made one called MySpace (for MySpace Layouts). I then created a weblog entry called ‘layout 1’ and filled in all of the custom fields. I also assigned that layout to the MySpace category. I then created a template called design for the individual page. What I don’t understand is the url is: http://demo.pmachine.com/Hr5QF/index.php/layouts/design/layout_1/

    but shouldn’t it be

    http://demo.pmachine.com/Hr5QF/index.php/layouts/design/myspace/layout_1/

    ??????

    I guess I don’t quite understand the concept of categories. I read the Wiki article on using weblogs or categories but I still didn’t get it.

    What I am after is having a Weblog named Layouts (for all Wordpress, Blogger, MySpace, etc. layouts to be stored)and then have a filter search on the on this page:

    http://demo.pmachine.com/Hr5QF/index.php/layouts/

    that takes you to:

    http://demo.pmachine.com/Hr5QF/index.php/layouts/myspace/
    or
    http://demo.pmachine.com/Hr5QF/index.php/layouts/blogger/

    where the user can click on a thumbnail or something to get to:

    http://demo.pmachine.com/Hr5QF/index.php/layouts/myspace/layout_1
    or
    http://demo.pmachine.com/Hr5QF/index.php/layouts/blogger/layout_1


    I hope I put this in the correct place. Any help appreciated. Thanks.

  • #2 / Jul 02, 2007 8:36pm

    Sue Crocker

    26054 posts

    Yes, you’re in the right spot. 😊

    Let me see if I can paraphrase what your problem is.

    You’ve created an entry called layout 1 which has categories assigned to it, but you’re expecting that entry to display with the category short name somewhere in the URL. Is that it?

    Global Weblog Preferences

    If you decide to use category URLs, you can get URLs that look something like this:

    http://www.yoursitename.com/index.php/category/blogger which will list all the entries in the blogger category.

    Instead you could create a single entry template which I usually call info, and your link would look like this:

    http://www.yoursitename.com/index.php/layouts/info/layout_1

    There are other methods to make your URLs look a bit different, but they involve .htaccess changes and some specialized templates.

    Let’s get you walking before you start to run. 😊

  • #3 / Jul 06, 2007 2:13am

    Zizzyx

    4 posts

    Hi Sue, thanks for your reply. Let me try and explain this better.

    I DO want the URLs to look like this:
    http://www.yoursitename.com/index.php/category/blogger

    I then want all of the blogger layouts to appear on that page.

    After somebody clicks on the layout they want it goes to a specific page like this

    http://www.yoursitename.com/index.php/category/blogger/layoutname1

    Where they can get the code and read the other information etc, etc.

    So, I would have to create a weblog named ‘Layouts’ and apply the category ‘blogger’ to it. When I publish a new blogger layout I would simply click the Blogger button under categories in the publish panel. That is all I would have to do to get it under the right place. Correct?

    After that I am lost as to what templates I would have to make and then what code(Expression Tags)I would have to use to get ONLY blogger templates showing on a page. As of now I only have an index page (index.php/layouts) and thats it. Where do I go from here.

    Any help much appreciated. Thanks.

  • #4 / Jul 06, 2007 1:38pm

    Lisa Wess

    20502 posts

    Hi, Zizzyx—

    Yes, for placing an entry in a category, you have it right.

    For showing only entries of that category is simple. ExpressionEngine uses the weblog entries tag {exp:weblog:entries} for delivering a lot of information and it bases that information off what is in the URL (unless you override that, which you shouldn’t right now).  Your URLs are a bit off, but here.

    Say you have this really cut-down weblog entries tag.  Note: do not use this for real, it’s just a short example:

    {exp:weblog;entries}
    <h2>{title}</h2>
    <p>{body}<br />
    {/exp:weblog:entries}

    If you visit this at just a template, say it’s in site/test, and you go to index.php/site/test - it will show many entries (default is limited to 100), the title and text. However, if you are using category names in URLs and instead go to index.php/site/test/category/blogger then it will limit its display to all entris in the blogger category.

    Does that make sense?  I don’t know what you’ve looked at so far so let me know if I need to back up a bit.  If I do, then I’ll probably point you at the Getting Started and Video Tutorial sections of the docs, for some background. =)

  • #5 / Jul 06, 2007 7:39pm

    Zizzyx

    4 posts

    I got it! I didn’t realize that EE did all the work of creating the page for you. Now that I got the category pages displaying properly there is a new thing I don’t understand.  😊 In the Quick Start tutorial I created a template called article and when you clicked the read more link you would be taken to an individual page. When I have something like this:

    Layouts(Weblog)
            Blogger(category)
            MySpace(cat)
            Xanga(cat)
            Wordpress(cat)

    If I created a template called ‘info’ in the Layouts weblog and made the template show all the info of each individual item would I be able to use that one template to control the links in all categories. Like on the MySpace page with all the layouts when a user clicks on one how do I link to it. And would I use the same link (which I assume would be ‘layouts/info’) for the Blogger and Wordpress etc.. categories? I hope that makes sense.


    Last question is about the custom fields. If I need some fields to be empty for some items will they still show up on the site if left blank?

    Thanks for all your help.

  • #6 / Jul 07, 2007 11:56pm

    Zizzyx

    4 posts

    Nevermind, I found out what I was looking for.

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

ExpressionEngine News!

#eecms, #events, #releases