Page 1 of 1

default category question

Posted: Sat Aug 06, 2011 7:38 pm
by tliitts
Hi,

I have Serendipity up and running (thanks to help from this forum) and it's reachable from a link on my website.

Presently I have four categories. If possible, I'd like Serendipity to initially display with just one of those categories when linked to from a specific page in my site. The rest of the time (when linked to from other pages) I'd like it to come up with all categories.

I found and tried the plugin for displaying a single category, but that doesn't quite meet the need of having it come up with a single category from a specific page but all categories from other pages.

Any advice will be greatly appreciated.

Terry Liittschwager
terryliittschwager.com

Re: default category question

Posted: Sat Aug 06, 2011 11:43 pm
by garvinhicking
Hi!

I'm not sure what you mean with "when linked to from a specific page in my site". You can simply link to your installation i.e. to http://yourblog/serendipity/categories/ ... egory.html and then you'll see only postings of a specific category, while people that go directly to your blog will see all postings...

Regards,
Garvin

Re: default category question

Posted: Sun Aug 07, 2011 4:27 am
by tliitts
Hi,

Many thanks for the reply. I think you've put me on the right track, but I'm still not quite there.

In http://terryliittschwager.com I have a WEBLOG link in the left navigational pane. It works fine, bringing up all categories (not much there yet as I'm just getting started).

In http://terryliittschwager.com/WB/JWB.php I have a Development Notes Blog link with which I'm hoping to get Serendipity up with just the JWB category.

Currently that link points to http://terryliittschwager.com/serendipi ... 1-JWB.html and produces a 404 error.

I've also tried it with http://terryliittschwager.com/serendipi ... s/JWB.html and that also produced a 404 error.

Looking in the serendipity folder on the server, I don't see a categories folder, and I can't find JWB.html in the other folders I've explored.

Any thoughts?

Again, any help is greatly appreciated.

Terry Liittschwager

Re: default category question

Posted: Sun Aug 07, 2011 10:39 am
by Mangek
Those folders does normally not exist. Serendipity can use something called "url rewriting" to make fancier looking urls which are easier to read for both humans and search engines. It is turned off by default though, and Serendipity produce links that follow the index.php?/stuff/here/link-1.html-pattern. (Meaning, your JWB articles are located here ) and if you use that link you'll only get that category.

If your server supports it, you could enable "mod_rewrite" which would make prettier links (and subsequently alter the link I gave above). You'll find it in the Administration Suite.

Click Configuration -> Appearance and Options -> Select "Use Apache mod_rewrite". I'm not 100% sure what happens if your server doesn't support it, either nothing happens or it may throw you an error, in which case you should be able just change back to the default "Disable url rewriting".

:)

Re: default category question

Posted: Sun Aug 07, 2011 3:03 pm
by tliitts
Many thanks!

Since I'm not concerned with search engines and I will be the only one looking at the link code, I simply used the url format you supplied and all is well.

Again, thank you.

Terry Liittschwager
terryliittschwager.com