Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager replace content
#1
Hello Guys,

the News Manager replace automatically my content.
I want to show the News in a extra DIV box on the right side.
On the left side i want to show the normally page content.

Can anyone help me?
Reply
#2
(2013-07-10, 05:53:21)Nighteyes Wrote: the News Manager replace automatically my content.
I want to show the News in a extra DIV box on the right side.
On the left side i want to show the normally page content.

Can anyone help me?

A possible workaround for this (I've seen some site using this method) is creating 2 pages: one for your main news page, and another for the posts.
You would select the second one in News Manager settings as "Page to display posts".
The first one would display its content, not being replaced.
The downside is that the main news page and news posts have different slugs.


Another way I can think of (without having to create that secondary page) is: in your template, replace
Code:
<?php get_page_content(); ?>
by:
Code:
<?php if (return_page_slug()!=$NMPAGEURL and nm_post_title('','',false)) get_page_content(); else getPageContent($NMPAGEURL); ?>

Notes:
- This works with News Manager 2.3.0 and later (not with 2.2.x or older)
- It's only for very simple news sites - you don't have archives, tag pages, etc. (If you need those, the script would have to be a bit different/longer)
Reply
#3
(2013-07-10, 23:12:34)Carlos Wrote:
(2013-07-10, 05:53:21)Nighteyes Wrote: the News Manager replace automatically my content.

Another way I can think of (without having to create that secondary page) is: in your template, replace
Code:
<?php get_page_content(); ?>
by:
Code:
<?php if (return_page_slug()!=$NMPAGEURL and nm_post_title('','',false)) get_page_content(); else getPageContent($NMPAGEURL); ?>

I have the same problem: I want a H1 heading "Announcements" in the page where news are displayed but the News Manager replaces it with its HTML content, not adding the content below the heading.
Since I am not familiar with PHP I rejoiced when I found the code above. But when I had applied it the result was all pages of my web absolutely blank with only the heading "Announcements" in all of them (including the page where news should be displayed). Not fully knowing what I was doing I modified the end of the mentioned code as follows:


Code:
... else getPageContent($NMPAGEURL).get_page_content();

And now whoopee, I obtained the heading "Announcements" and under it the news in the page where news are displayed. But at the same time, I have the heading "Announcements" also above the content and its proper headings in all other pages (all pages beginn with the heading "Announcements" and have so two different headings now). So how should the code above be adjusted so that the page with the news has the heading "Announcements" and other pages have only their own proper headings?
Reply
#4
See here:
http://get-simple.info/forums/showthread...6#pid58066
(since News Manager 3.0)
Reply
#5
(2016-12-28, 02:03:39)Carlos Wrote: (since News Manager 3.0)

Thank you, I didn't realize the difference between News Manager and News Manager (updated).
Reply




Users browsing this thread: 1 Guest(s)