Member
Member
n20capri   2010-02-26, 17:33
#1

So I'm using the code below to include the latest news on my home page but it's not formatted. I have a couple lists and spaces between my paragraphs but it's displaying all strung together. When I view the news page by itself it's formatted but when included it's not.

Any idea what I'm missing?
Thanks,
Mike

Administrator
Administrator
acrylian   2010-02-26, 18:01
#2

Well, you will of course need to add some CSS styling. Besides, the news page display is not done with getLatestNews but with the next_news loop. Best you read the theming tutorial before proceeding.

Member
Member
n20capri   2010-02-26, 22:20
#3

All the CSS IS there. My whole site is custom and working fine. The zengallery and other zenpage pages are fully integrated and looking great. This is the third custom integrated site I've done - styling is not the problem. As I said when this page is viewed on it's own it's styled just fine. Just when included into the home page is it not styled. Everything else on that page is styled fine as well...

Administrator
Administrator
acrylian   2010-02-27, 11:18
#4

So what do you mean by "included in the homepage" exactly? You can simply include Zenphoto pages in another page using include()... If you want that you either have to use an "ugly" iFrame or try the "Zenphoto as a plugin" way on our user guide.

Member
Member
n20capri   2010-02-28, 03:53
#5

I designed the site then I want to incorporate zenphoto and zenpage into my design. I had everything integrated except for getting a news article on the home page. After searching I found the above code which did what I wanted but there was no formatting.

I've since changed the way I did it by simply "including" pages.php. I didn't try that at first because I didn't think it would be that easy. lol. It's all done now and looking awesome. All the content is zenpage and the gallery is zenphoto...I'm very happy with the way it worked out.

Just need to go over the content and re-organize the gallery...

http://dev.davidsonscollisioncenter.com/

Member
Member
n20capri   2010-02-28, 03:54
#6

Oh and I didn't use an iframe either... :-)

Member
Member
mikeque   2010-06-01, 00:59
#7

I have searched high and low. Is there any documentation on getLatestNews() more than the list of functions page?

Member
Member
Blue Dragonfly   2010-06-01, 05:28
#8

The getLatestNews gets just the content - if you want to print it with formatting, you may be looking for printLatestNews instead, unless you're making your own function to format the data from getLatestNews.

Member
Member
mikeque   2010-06-01, 11:45
#9

Yes, @blue dragonfly, I was looking to format the output via getLatestNews. I guess what I was asking for is a bit outside of the scope of these forums and I'd need to delve into picking apart the array, etc.

Administrator
Administrator
acrylian   2010-06-01, 11:48
#10

You could just look at the printLatestNews() as a guide how to do it or adapt it to your wanted output. If you just want pure news articles you can do this with a quite simple forech loop.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.