Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: All pages in one  (Read 6208 times)

teamcoltra

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
All pages in one
« on: May 05, 2008, 06:18:45 pm »

I am wanting to create 2 different templates for snews... one horrizontal and one very long.

Here is my question:
Is there a way to post all the content items and such on one page?

like News Posts, Contact Us, Custom Page etc. on one page, and prefrably seperate them? I know that I could go into snews.php and edit the style for the content to allow myself to put an id="'.$title.'" in the code. Then just link to those in the main links. But that still doesn't answer how I would get all the pages to load at once.

If I am confusing anyone please tell.. and sorry this is my first post so if this is not the right place for this thread please tell me.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: All pages in one
« Reply #1 on: May 05, 2008, 11:11:09 pm »

I am wanting to create 2 different templates for snews... one horrizontal and one very long.
Here is my question: Is there a way to post all the content items and such on one page?
If I am confusing anyone please tell.. and sorry this is my first post so if this is not the right place for this thread please tell me.

Welcome to sNews TeamC. I am a little confused by your explanation... but here's my take on it.
You want to have the ability to display different pages or categories in different templates. You can do that very nicely with Bakercad's new Template Switcherizer 2. It slices and dices and even washes the dishes after dinner.  ;D
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

teamcoltra

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Re: All pages in one
« Reply #2 on: May 06, 2008, 06:06:31 pm »

Sorry for my bad explination: Let me give you a ascii view of what I am talking about... this would be the layout of the FULL PAGE.

=================
WebSite Title
---------------------------
link1 link2 link3 -\/
---------------------------

Blog Entries
AAA
lkjdlakjdljlfkjalfjdlkafjlfd
alkdlkdafjlkdjflajfldajlfkj
ajlfjdlafjldajfldjalkfjdlakjl
BBB
adkfjladlfkdajlkjdfalfjadf
aljdfalkjfdlajdfljadlfjladfjk


----
Contact us

|=======| Name
|=======| Email Address
|=======
=======
=======| Message
2+2 = []

(submit)

----
Portfolio (new content cat.)

[=] [=] [=] [=] [=] [=]
[=] [=] [=] [=] [=] [=]
[=] [=] [=] [=] [=] [=]


===========
Footer
===========



Those links would take you to different areas on one page.


Basically... instead of having everything on different pages... I want one incredibly long page.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: All pages in one
« Reply #3 on: May 06, 2008, 06:25:26 pm »

Sorry for my bad explination: Let me give you a ascii view of what I am talking about... this would be the layout of the FULL PAGE.

===================
WebSite Title
-------------------------------------
link1 link2 link3 -\/
-------------------------------------

Link1 section of the page

-------------------------------------

Link2 section of the page

------------------------------------

Link3 section of the page

------------------------------------
     page footer

Those links would take you to different areas on one page.
Basically... instead of having everything on different pages... I want one incredibly long page.

That would defeat the purpose of using sNews to generate individual pages then... wouldn't it?

You can use a little javascript to link to several locations within the text of a page... each link would then connect to a locator that you would need to insert into your page content where you want the link to lead to.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: All pages in one
« Reply #4 on: May 06, 2008, 06:30:14 pm »

A joke: you run out of paper?

You must make this modification first.

Logged

teamcoltra

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Re: All pages in one
« Reply #5 on: May 06, 2008, 06:32:41 pm »

Not really, the reason I like using snews is because I like how light weight it is, and I can still update it via an admin panel.
However, my page is a VERY thin page... and I want to be able to show potential clients everything i can do on one page.

Its not destroying what snews is there for... its just changing its use to fit my own personal needs. :)
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: All pages in one
« Reply #6 on: May 06, 2008, 06:42:01 pm »

Not really, the reason I like using snews is because I like how light weight it is, and I can still update it via an admin panel.
However, my page is a VERY thin page... and I want to be able to show potential clients everything i can do on one page.

Its not destroying what snews is there for... its just changing its use to fit my own personal needs. :)

Then you just publish several articles to any one category... set the number of articles to display on a page to many more... and they will all display on that category page. You then insert whatever you want into the textareas of your articles... such as link-locators at the top or bottom of each article so that your links at the top of the first article on the page will link to other locations in the page.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

teamcoltra

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Re: All pages in one
« Reply #7 on: May 06, 2008, 06:42:29 pm »

Actually, you know what:
I am just going to use the sidebar script in my main page (before i just cut it out) and just have a list of articles and such, and then have my portfolio there on top and make that my index page.
I will do some modifications to the snews.php file to get rid of some of the hardcoded styles probably. I haven't looked yet, but it will work just fine.

Thanks for your help guys.
« Last Edit: May 06, 2008, 06:44:33 pm by teamcoltra »
Logged

centered

  • Guest
Re: All pages in one
« Reply #8 on: June 12, 2008, 12:49:47 pm »

coltra,

(A little late, I see, but interesting topic to say the least)

Your idea should work with some modification.  I like the one page websites and wanted to do something like that for sometime, but never tried with sNews.

In theory, it should work, as mentioned before.  An example would be:
Code: [Select]
<?php echo s('website_title'); ?>
---------------------------
Manual entry of links with added #id
---------------------------

<a href="#" id="Blog">Blog Entries</a>
<?php center(); ?>

<a href= Back to the top link>Top</a>

----
<a href="#" id="Contact">Contact us</a>
<?php contact(); ?>

<a href= Back to the top link>Top</a>
etc.....

In theory, this should work, but realistically it probably wont. The biggest problem I see would be calling the Portfolio based on your drawup, as you have it as a category, you can't call up single categories yet... The other problem would be blog entries, if you accidentally add a break or want comments then it takes away from the one page element.

If you want a blog to add wait until 1.7 to fully realize this idea, since you can have a blog category and have categories within that. With current 1.6 I would suggest sticking with pages for the front page content and showing blog entries with menu_articles.  Let me show my alternate example:

Code: [Select]
<?php echo s('website_title'); ?>
---------------------------
Manual entry of links with added #id
---------------------------

<?php
if ($_SESSION[db('website').'Logged_In'] == token()) {
center('admin'); }
?>


<a href="#" id="about">About Me</a>
<?php single_entry('','about'); ?>
// About is a page

<a href= Back to the top link>Top</a>

----
<a href="#" id="portfolio">Portfolio</a>
<?php single_entry('','portfolio'); ?> (showing some text etc... This is a page)

<?php single_entry('graphic_design',''); ?>(showing pictures...  this is a category)
<?php single_entry('print_design',''); ?>(showing pictures...  this is a category)
<?php single_entry('web_design',''); ?>(showing pictures...  this is a category)

<a href= Back to the top link>Top</a>

----
<a href="#" id="Contact">Contact us</a>
<?php contact(); ?>

<a href= Back to the top link>Top</a>

===========
Footer
===========

The idea here is to call single items in the template.  I imagined a single_entry function to be called similar to this idea:

Code: [Select]
function single_entry($category, $page) {
// some error checking since we wouldn't want both being called at the same time
// example
if ($page) { $pos = '3';
query = 'select text from articles where seftitle (or title) = $page and position = $pos;
$result = mysql_query($query);
while ($r = mysql_fetch_array($result)) { return file_include(r['text'],''); }}}

Let me point out, that you should have the content already created in a test environment before adding a test function and template like this IMO.  A similar idea was done by me here calling extra functions by seftitle.  I created them first, then added them to the template where I wanted them to be
      
Hope that helps a bit....

If anyone wants to see some one page websites in action - onepagelove.com
« Last Edit: June 12, 2008, 12:55:23 pm by equilni »
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: All pages in one
« Reply #9 on: June 12, 2008, 02:42:54 pm »

Equilni,
I saw some of examples from link provided by you. Very nice, but you don't need a CMS (speaking of sNews) for that...  can be a drawback... A single page site can be made in XHTML+CSS or a PHP page, or else... , with portofolio, or a simple news aggregator....
Is enough to have a flat file version if you want a CMS... as NanoCMS. Anyway, is hard to load a page like that...

onepagelove.com is with Wordpress but of course, that is not a one page site...
Anyway, I like your solution.
« Last Edit: June 12, 2008, 02:48:29 pm by funlw65 »
Logged

centered

  • Guest
Re: All pages in one
« Reply #10 on: June 12, 2008, 03:04:33 pm »

I think sNews, modified, would be a perfect solution for this.  What if you wanted to add or edit content?  You can do that easily through the admin.  I think something big as WP would be overkill and a custom php script would be too little.  just my opinion....
Logged