I need to pull current news page's category name from somewhere
Permalink
Ok here's the deal. My client uses pronews as the block to add news items to his site. Now i have been tasked on creating a sort of categorizing system as in the future news will be categorized.
Originally the website was not designed to have different news categories. The way i have achieved this is by adding new pages with different news lists and then making a scrapbook navigation to the left where it links to the pages with different news listed. However my problem is that now in the news_post/view.php i have this link embedded to the end of every news item where it says "click here to read all news".
Problem is that now that we dont have a single page anymore with all the news listed this becomes very misleading to the user. At first they click the news page, then they decide to click a news category "Auctions" and then be taken to the auctions page where there is a news_list which lists only the news in the category "auction". And in the end of the news item it reads "click here to read all the news" so the user has to return to the starting point.
My plan was to get the news category of the news item the user is viewing and then generate a link according to the news category to the end. However i cant figure out how to get this kind of information.
I have been wondering about the possibility of making a browser back button style script but there are plenty of problems with that.
Any suggestions? Thanks in advance. I am also open to suggestions how to make implement this kind of system in a different way.
Originally the website was not designed to have different news categories. The way i have achieved this is by adding new pages with different news lists and then making a scrapbook navigation to the left where it links to the pages with different news listed. However my problem is that now in the news_post/view.php i have this link embedded to the end of every news item where it says "click here to read all news".
Problem is that now that we dont have a single page anymore with all the news listed this becomes very misleading to the user. At first they click the news page, then they decide to click a news category "Auctions" and then be taken to the auctions page where there is a news_list which lists only the news in the category "auction". And in the end of the news item it reads "click here to read all the news" so the user has to return to the starting point.
My plan was to get the news category of the news item the user is viewing and then generate a link according to the news category to the end. However i cant figure out how to get this kind of information.
I have been wondering about the possibility of making a browser back button style script but there are plenty of problems with that.
Any suggestions? Thanks in advance. I am also open to suggestions how to make implement this kind of system in a different way.
It looks like this.
$cck = CollectionAttributeKey::getByHandle('news_category');
$newsCategory = $c->getCollectionAttributeValue($cck);
I am still open for suggestions how to develop this kind of system. The way i am going to do this is a bit complicated by creating new pages with different news_lists then having a scrapbook navigation and now generating links in the view.php of the news post.