Jump to content

wiki.processwire.com - simple news system tutorial


MarcU
 Share

Recommended Posts

Hi guy's

I'm new with PW and very happy with it - thanks alot Ryan and team for this great work!

I just completed the simple news system tutorial on the wiki page (thanks alot to the author - who was it?) - works perfect, except for one thing:

I would like to get the categories-breadcrumb - when a news list of a specific category is displayed - take me to the main news page with all news items listed. Now it gives me 404. Allowing the url segment news/categories - where the breadcrumb points to - in the TUT_news_index template or the TUT_news_index unfortunately didn't make it work.

Same problem with the news-articles breadcrumb link on the article display page. See attached screenshots.

Is anyone familiar with the tutorial / the simple news system and coud give me a hint?

Thanks alot for any help in advance.

Cheers, Markus from beautiful Switzerland

post-3521-0-60724700-1434886626_thumb.jp

post-3521-0-41291300-1434886627_thumb.jp

Edited by LostKobrakai
Moved to general support
Link to comment
Share on other sites

Sorry folks, I have to get into it first - my problem was in fact very simple and here I found simple solution myself:

For each of the two hidden pages "news-articles" and "categories" I made a template-file with the following redirect:

<?php
$session->redirect("../news/");
?>
 
Maybe Joss could add this to the wiki page.
 
Works perfect now. Problem solved, but is there any built-in way of managing redirects in PW? I could't find any module with this specific functionality.
 
Cheers, Markus
Link to comment
Share on other sites

Hi Mr Fan

sorry again. In the access-tab of a no-file template I only get the first row ("do you want to manage..."). The rest ("What to do..." is missing. Where can I get it? Do I have to install a module first?

Markus

Link to comment
Share on other sites

Oh sorry forgot - empty template file is missing....but you don't habe to redirect manual via session....just fast from the phone...

edit: should really work without template file...

Edited by mr-fan
Link to comment
Share on other sites

Danke, mr-fan

I made a totally empty template file now and attached it to the template. The access-tab still looks the same. Also with other templets with associated template files the access-tab looks all the same. Any other thing to do?

Link to comment
Share on other sites

mr-fan

sorry for my slow comprehension. I had to uncheck the access for guests first, then the rest popped up. Actually works now, but since this redirection method has effect on the parent page also when children are accessed, it is usesless for me. I want a redirect only when only the parent (without children) is accessed. A bit tricky - so probably I will have to stay with the $session->redirect() which works perfect for my needs.

Thank you anyway for your time and help!

Regards, Markus

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...