Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 5

Author Topic: Categories and pages  (Read 27687 times)

Elessar

  • Newbie
  • *
  • Karma: 1
  • Posts: 43
Categories and pages
« on: September 28, 2007, 05:53:51 PM »

Hi,

I wanna know, is there a mod (I check but didn't see anything) that could make the possibility of having 'Categories' in 'Pages', I mean I would like having something like : The page 'Web design' and in that page 2 categories like 'Website design' and 'sNews design'. (in which of course a lot of articles.  ;D )

regards,  ;)
Logged
I'm a french guy, so if I made some mistakes in my post, just tell me. ;)

Joost

  • Guest
Like subcategories
« Reply #1 on: September 28, 2007, 06:20:10 PM »

You mean something like subcategories. Unfortunately no.
Logged

Elessar

  • Newbie
  • *
  • Karma: 1
  • Posts: 43
Re: Categories and pages
« Reply #2 on: September 28, 2007, 10:22:00 PM »

Yeah something like that, but in 'PAGES' and why not in 'CATEGORIES'.
well I don't know php language, and I've no time to learn it. else I'll have code it, but ...

well If someone wants to do it, just do it. ;D

thanks for your answer.
Logged
I'm a french guy, so if I made some mistakes in my post, just tell me. ;)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Categories and pages
« Reply #3 on: September 29, 2007, 04:36:00 PM »

Using Philmoz's Hidden Articles and Display Hidden Articles mods... you can publish an article without it being displayed. Then, with Mattonik's Insert Links Panel mod... the article links will be displayed in the panel so that you can click the link(s) and insert them into a given article. So... on a given "Page", you could create a page-specific "extra" and in it you would create your list of links to the hidden articles. You could have a dozen links to hidden articles from that page... or more.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Elessar

  • Newbie
  • *
  • Karma: 1
  • Posts: 43
Re: Categories and pages
« Reply #4 on: September 29, 2007, 10:32:16 PM »

Are you talking about that mod ?
well I'd need some free time to do it.

And from mattonik I didn't found 'Image links Panel' but 'Insert Links Panel'
I look in 'Mods/addons' topic


Thanks for helping me
Logged
I'm a french guy, so if I made some mistakes in my post, just tell me. ;)

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Categories and pages
« Reply #5 on: September 30, 2007, 05:58:41 PM »

*clears throat*
Quote from: Elessar
make the possibility of having 'Categories' in 'Pages'

I've tried on a couple of occasions to raise this point, but so far the interest seems low to non-existent.
As I see it, allowing Categories to be on the Page level would be wonderful but it would also mean rebuilding or rethinking the whole structure of sNews.

As it is, Categories is the first level (remember, Home is a Category in the default structure); Articles and Pages is the second level; and Comments is the third (final) level.

Your suggestion would, it seems to me, require a different structure, and what I've proposed as food for thought is this:

***
Pages is the first level (Home is a Page, not a Category);

Categories is the second level. Categories can be assigned to any created Page, and they can be assigned to multiple Pages (Design can have categories Print Design, Web Design and Garden Design; Style can have categories Fashion, Web Design and Photography). If a category exists but no pages have been created yet, the category is by default assigned to the Home Page.

Articles is the third level. An article can be assigned to a Page or a Category (multiple Categories but limited to a single Page). Comments are on the same level, or possibly a sublevel, but tied to Articles. E.g: No comments without articles. If no Pages and no Categories exist, an article is automatically assigned to the Home page.

***

Pros: A structure that better fits both static and dynamic content; gives more options in terms of site hierarchy and makes sNews an even more full-featured CMS.

Cons: Presumably requires a rewrite of the core and .htaccess; presumably requires an entirely fresh installation rather than a "simple" upgrade from earlier versions (database differences, changes to existing mods etc).

***

Conclusion: Categories assigned to Pages doesn't exist yet. If it ever will, it'll take some work (= time) to make it happen. I would very much like to see it happen, though.
Not just for MU btw, this is something that affects sNews as a whole.
« Last Edit: September 30, 2007, 06:01:29 PM by Fred K (agentsmith) »
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Categories and pages
« Reply #6 on: September 30, 2007, 08:32:59 PM »

*clears throat*
Quote from: Elessar
make the possibility of having 'Categories' in 'Pages'

I've tried on a couple of occasions to raise this point, but so far the interest seems low to non-existent.
As I see it, allowing Categories to be on the Page level would be wonderful but it would also mean rebuilding or rethinking the whole structure of sNews.

As it is, Categories is the first level (remember, Home is a Category in the default structure); Articles and Pages is the second level; and Comments is the third (final) level.

Your suggestion would, it seems to me, require a different structure, and what I've proposed as food for thought is this:

***
Pages is the first level (Home is a Page, not a Category);

Categories is the second level. Categories can be assigned to any created Page, and they can be assigned to multiple Pages (Design can have categories Print Design, Web Design and Garden Design; Style can have categories Fashion, Web Design and Photography). If a category exists but no pages have been created yet, the category is by default assigned to the Home Page.

Articles is the third level. An article can be assigned to a Page or a Category (multiple Categories but limited to a single Page). Comments are on the same level, or possibly a sublevel, but tied to Articles. E.g: No comments without articles. If no Pages and no Categories exist, an article is automatically assigned to the Home page.

***

Pros: A structure that better fits both static and dynamic content; gives more options in terms of site hierarchy and makes sNews an even more full-featured CMS.

Cons: Presumably requires a rewrite of the core and .htaccess; presumably requires an entirely fresh installation rather than a "simple" upgrade from earlier versions (database differences, changes to existing mods etc).

***

Conclusion: Categories assigned to Pages doesn't exist yet. If it ever will, it'll take some work (= time) to make it happen. I would very much like to see it happen, though.
Not just for MU btw, this is something that affects sNews as a whole.
For starters like this:
1) Add field to categories table; for example, `pageid` and make it's input as combo from built-in/custom pages (ensure that it's possible to assign to any page as well)
2) Either add minor modifications to categories() and articles() (don't recall exact function names) or make new ones from them making sure that field added in step 1 is used for output handling.

This would provide for simple 2 level structure. If needed one can add additional field to articles table to select between default output or custom one for pages at least; and put different output in center() for pages with custom one - like list of links to filtered categories or articles from filtered categories or whatever.
Logged

Joost

  • Guest
Re: Categories and pages
« Reply #7 on: September 30, 2007, 09:48:07 PM »

Yes Fred, this discussion shouldn't be in MU section at all (sorry about that).
In my opinion there is no level in sNews concerning pages and articles, the way you describe (comments are a different matter). When looking at the core processes, you can see that sNews basically cares for articlesef. When an articlesef is in the database, sNews will dish it out, even when the given category is wrong. Of course this can be 'fixed'.  I don't do that for obvious reasons, I just present an 404 error along with the article.

I am aware that namespaces can be misleading. The url suggests that different levels actually exist:
http://snewscms.com/extend/addons/

level 0 http ://snewscms.com/
level 1 extend/
level 2 addons/

By the way, http://snewscms.com/blah/addons/  will show the same, without 404 header.

Basically, a category can be considered no more then a command to make a menu with links to a selected group of page/articles.

You can add an extra field to table 'articles' to make this selection. Lets call it 'sub'.
--Table articles
id  title  sub
0 Office null
1 Baker   0
2 Miller   0
3 Britney 0
4 Justin   3
5 Cheap  3

When office is called for, a menu is generated with pages where the sub is equal to the value of id:
Menu:
1 Baker   0
2 Miller   0
3 Britney 0

Of course we have to make sure that pages with 'sub' value set, are not displayed on pages.

Now the interesting part:
The 'sub'  of Cheap and Justin have the same value as the id of Britney. So on page Britney, we have a menu containing:

4 Justin   3
5 Cheap  3

In fact, we have created a subcategory. That's why I called the extra field 'sub'. :)

So far for the basic idea. Implementing will  require lot of work. As you can see, namespace or levels should not be worried about.


« Last Edit: September 30, 2007, 09:49:46 PM by Joost »
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Categories and pages
« Reply #8 on: September 30, 2007, 10:12:30 PM »

Few more things on my implementation ideas posted above:
 - allows to assign category to single page only (single is limitation, but implementation doesn't require complex modifications for starters)
 - usability for editor is simple and understandable (just assign/constrain category to page or not instead of juggling special numbers/codenames)
 - if obvious structure page->category->article is suitable/handy one for intended website audience then it's better that way for editor as well
 - this linkage between pages/categories should not be transfered to urls of pages/categories/articles used (Urls stays as before, so again no need for any additional complex modifications, and what for it should be transfered there anyway)
Logged

Elessar

  • Newbie
  • *
  • Karma: 1
  • Posts: 43
Re: Categories and pages
« Reply #9 on: September 30, 2007, 10:43:03 PM »

Sorry guys to post this subject in MU, but it was just because I'm using it, so I asked here.
And thanks for all your answers, it seems to me more complicated than I thought it was. Sorry for that.
I wish I know how to code and I'd have try to do it.

Perhaps this thread could be moved somewhere else, somewhere where more users will see it.
« Last Edit: September 30, 2007, 10:44:41 PM by Elessar »
Logged
I'm a french guy, so if I made some mistakes in my post, just tell me. ;)

Joost

  • Guest
Re: Categories and pages
« Reply #10 on: October 01, 2007, 01:04:20 AM »

Few more things on my implementation ideas posted above:
 - allows to assign category to single page only (single is limitation, but implementation doesn't require complex modifications for starters)
 - usability for editor is simple and understandable (just assign/constrain category to page or not instead of juggling special numbers/codenames)
 - if obvious structure page->category->article is suitable/handy one for intended website audience then it's better that way for editor as well
 - this linkage between pages/categories should not be transfered to urls of pages/categories/articles used (Urls stays as before, so again no need for any additional complex modifications, and what for it should be transfered there anyway)

I guess usability for editors would be the same (I would not confront an editor with codenames either  ;)) in both approaches.
However, what I like about Cody's approach, is the addition of an id at the category side. That way it is easier to present two possible site structures:
1 The default way: presenting a category index with article snippets and 'read more' links.
2 Displaying an article-menu on the page itself and in the articles (no category index). That would make the site look less blog-like, which is sometimes preferable.

I don't see what's the point of limiting this feature to pages. Harder to implement, if I understand it well? When it is id-based, it shouldn't make much difference. Please explain.
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Categories and pages
« Reply #11 on: October 01, 2007, 05:16:33 AM »

Quote from: codetwist
- usability for editor is simple and understandable (just assign/constrain category to page or not instead of juggling special numbers/codenames)
 - if obvious structure page->category->article is suitable/handy one for intended website audience then it's better that way for editor as well

I think this would be a step in the right direction. Whether categories should be limited to a single page or not -- I guess it comes down to how you view pages, if it's "like articles" or if it's "other content". In my head I imagine that I have a number of pages, all with their own categories. Pages, to me, are "sections" of a site. Categories are collections of articles, sorted under those sections. While it's certainly possible to have overlapping sections, sections that deal with related matters, I think (emphasis on the "think" thing) that the generic scenario is that site sections are clearly defined. That would lead to a generic setup where categories are assigned to single pages. I might be wrong though... ;)
Logged

Joost

  • Guest
Re: Categories and pages
« Reply #12 on: October 01, 2007, 12:37:06 PM »

I might be wrong though... ;)
Your not. A category is assigned to a single id in both approaches. Whether it is a page or an article, it doesn't matter. There is no overlap.
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Categories and pages
« Reply #13 on: October 01, 2007, 01:16:49 PM »

Doh ... Fred beat me to that section word ;)

That's the reason why I prefer to treat pages differently, using them either as sections or top level 'static' pages. Note that my audience for such approach are businesses - and they want clear, structured presentation of their products/services/company and may be some news, event tracking and something like that. There might be some specialized pages with mashups and all, but that's basically it - the rest is plain classical structered web site. And as a rule approach Top pages and 'sections' -> categories as needed -> and articles as detailed info works for them. May be because it somehow corresponds to techniques used in their daily works - organizational structures, functions, product/service sets and rest of mba-ishness.
If additional 'categories' are needed then either different system should be plugged in if that's for real or some modding done to support additional visualised tagging with keywords along with simple if somehow rigid categories IMHO.

In short, for now it's what I have found out as feature requested by customers ;) May be Yours want something different.
Logged

Joost

  • Guest
Re: Categories and pages
« Reply #14 on: October 01, 2007, 06:51:12 PM »

Doh ... Fred beat me to that section word ;)
In short, for now it's what I have found out as feature requested by customers ;) May be Yours want something different.
Ok, so not for technical reasons, that is. But don't get me wrong, Codetwist. I don't care whether content is positioned 1 or 3. The only reason we know that, because we lpeak into the database once in a while ;). Basically I only concerned with functionality.
What my customers want? Categories that start with a full page, not an index (point 2 in my previous post)

2 Displaying an article-menu on the page itself and in the articles (no category index). That would make the site look less blog-like, which is sometimes preferable.

And of course, they want subcategories as well.
Logged
Pages: [1] 2 3 ... 5