Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Only display content on Home without using Extra Content  (Read 3875 times)

Jochum Meester

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 309
    • JochumMeester.com
Only display content on Home without using Extra Content
« on: December 17, 2007, 10:47:13 am »

Hi everyone, it's been a while since my last visit, but webdesigning has caught my interest again :) Hope you're all well! I see that you now have sNews MU! Great! Good work everyone, my compliments.

I've installed sNews MU (downloaded from this website under 'downloads') on a friend's website: http://www.ru.nl/hastu (it's in Dutch) and now we've run into a problem. He would like to have an intro text on Home only (so on the first page you see) but Extra Content also shows the introtext on archive, site map etc (this might be a bug?). So I tried something different; I believe I used this (dont have access to the files right now to copy the correct line)
Code: [Select]
<?php if(get_id('category') < "1") { echo intro blabla ?>I tried something like that, because I thought the category id for Home was 0 (but using == "0" didn't work so I changed it into < "1"). But, the thing is, when I log into the admin area, it redirects me to the admin panel, although the page's url is the root url (in other words, the home page) and then it shows the intro text again.

My question is, can I use something like the piece of code above to show the intro text only on Home? I hope I made my situation clear. Thanks in advance.

The introtext is the piece of text starting with:
(title > )Handbalvereniging N.S.Z.V. Ha-Stu in Nijmegen
Onze ongeveer 30 jaar oude vereniging met momenteel 80 actieve ....
« Last Edit: December 17, 2007, 01:48:08 pm by Jochum Meester »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: Only display content on Home without using Extra Content
« Reply #1 on: December 17, 2007, 03:07:53 pm »

If I wanted some specific text on one page only... such as the "home" page... I would:
1 - create a new page with the content I want to show only on "home" and, before saving it, choose "home" from the "Appear only on Category" field in the Customize panel.
2 - Next, I would go into the "Settings" >> "Content" panel and choose my new page from the "Use an existing page for the Home Page" field, and save the changes. This will display the new page as the home page.
3 - I would then put the specific text within that page's textarea where I want it to display... either by:
   a) entering it in there directly...
   b) or by putting it within a new function (in a file for custom functions included at the top of index.php) and insert that function's name in the textarea using Philmoz's Function Insert mod.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Jochum Meester

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 309
    • JochumMeester.com
Re: Only display content on Home without using Extra Content
« Reply #2 on: December 17, 2007, 05:41:01 pm »

Right... why didn't I think of that?  ::)

Your help is very much appreciated! :)
Logged

Jochum Meester

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 309
    • JochumMeester.com
Re: Only display content on Home without using Extra Content
« Reply #3 on: December 17, 2007, 05:50:08 pm »

OK now I have another problem, I tried searching for this on the forum yesterday, but had no luck. On the 'home' page I would like to show the latest article from all categories, although my default settings are to show 3 articles on every page (and if it has more than 3, it uses pagination). I've tried copying the code in center(); and set a number fot the $article_limit myself but I can't get it to work. I've got this on my PC and not online, because I can't access the admin area of the website I posted in this topic's first post. Otherwise I would've shown you so you could have a look.

Some help with this would also really be appreciated, or if it's too much to ask, if you could point me in the right way that would also be appreciated!
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Only display content on Home without using Extra Content
« Reply #4 on: December 17, 2007, 05:56:04 pm »

With following MOD applied You can select which articles from categories get promoted to home at all from admin interface: [MOD] Show In Frontby H.A.C
Logged

Jessica Michelle

  • Newbie
  • *
  • Karma: 1
  • Posts: 21
  • DivaDivine
Re: Only display content on Home without using Extra Content
« Reply #5 on: April 05, 2008, 03:12:11 am »

If I wanted some specific text on one page only... such as the "home" page... I would:
1 - create a new page with the content I want to show only on "home" and, before saving it, choose "home" from the "Appear only on Category" field in the Customize panel.
2 - Next, I would go into the "Settings" >> "Content" panel and choose my new page from the "Use an existing page for the Home Page" field, and save the changes. This will display the new page as the home page.
3 - I would then put the specific text within that page's textarea where I want it to display... either by:
   a) entering it in there directly...
   b) or by putting it within a new function (in a file for custom functions included at the top of index.php) and insert that function's name in the textarea using Philmoz's Function Insert mod.

 ;) Hi there long time no see! Word spread of SNews MU and since i have a new web project which will require external dudes to update the content, i have decided to use it head on. My previous project was a success using SNews 1.6. Rock on!  8)

 I wanted to ask two things:
1) This particular thread interests me though i could not find Philmoz's Function Insert Mod. Care to point me in the right direction? It may suit one of my ideas for the Home page i think...

2) The extra functions function is very attractive, but i have found that when i write a text to add to the extra functions column, and i try to break it using the [break] function it doesn't get split. It get's published with the [break] command in there. Is this part of the functionality, not being able to split the Extra Contents articles, or it may be a bug? Thanx for your comments and solutions! Cheers!
Logged
Slutty alright but pretty and with BRAINS

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Only display content on Home without using Extra Content
« Reply #6 on: April 05, 2008, 05:25:13 am »

Hi Jessica Michelle, welcome back.

1) Try out the brand spanking fresh 1.7 RC if you're not under a terrible time strain (it's not quite ready for production sites yet but it's stable enough). 1.7 comes fitted with the function mod -- you can spot it by the Function button in the basic text editor. If you prefer to use 1.6, which is stable, then go to the 1.6 Mods forum and search for Function mod here for the mod -- note: it's for sNews standard (Single User), so you may need to change it to work with MU.

(No, there's no MU version of 1.7 yet, sorry.)

2) [break] does not work in Extra, no. I guess no-one considered the need to use Extras for longer content until people started asking about the break function not working. [break] is intended for articles.

Cheers
« Last Edit: April 05, 2008, 05:30:01 am by Fred K (agentsmith) »
Logged