Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Showing categories on one page only  (Read 2392 times)

Sathington Willoughby

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
Showing categories on one page only
« on: April 11, 2007, 03:00:01 am »

Dear all,

Firstly, what a great little CMS. Fantastically simple, and very easy to customize!

I have been playing around with it for use on my home site. I'm a web designer, so not to savy with php code, though I can get around without too many problems. The question I have to ask is about the functionality of the CMS.

I'll tell you a little about my site. It's made up of four sections. The home page - kinda self explanatory I guess. Then a service and portfolio page - both of these are "static pages" that I will add to in order to fill them with content. The final page is an "Info" page.

Now I need this "Info" page to be the heart of the CMS. Here I need to show all my categories and articles so people can flick through and read as they go. The problem I am having is that I do not know how to set it up so "Info" can be dynamic, but the other pages static. I cannot add tags like to the extra contents can I, as it renders articles and pages as if they were HTML?

Any suggestions? Hopefully i explained myself properly.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Showing categories on one page only
« Reply #1 on: April 11, 2007, 03:34:45 am »

You can create an "Info" page as a new page, then from the main Admin Panel, expand the "Site Settings" panel... then the "Contents" Panel... and in there you can choose which page shows as the "Home" page. So, choose your "Info" page and it will display as the "Home" page.

With sNews, you only have one template page... and all content (articles, pages and Extra contents) are generated dynamically by the engine functions (in snews.php) and displayed through the main content container in your tempate file (index.php) via the function statement.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Sathington Willoughby

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
Showing categories on one page only
« Reply #2 on: April 11, 2007, 04:45:14 am »

Thank you for your help.

I wonder if it is possible to place tags like or into the index.php template file and have them only show up on particlular pages?
Logged

Sathington Willoughby

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
Showing categories on one page only
« Reply #3 on: April 12, 2007, 04:25:22 am »

I guess what I am trying to do is include inside something like the extra contents so I can specify with page the list of categories will show up on... So I can have a second home page purely for reading articles.
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Showing categories on one page only
« Reply #4 on: April 12, 2007, 08:49:16 am »

There is mod Adding id to the tag  that enables function bodyname().

With ideas and code from that mod applied You can enclose index.php part that provides the category box in conditional if block.

Code: [Select]
$curPageName = bodyname();
if ( $curPageName = '' ) {
?>


Categories





Notice that code provided is conceptual mock-up, You may need to modify it a little, and read that mod info as You will have to make sure that function bodyname() returns what's needed for Your case.
Logged