Member
Member
amdbuilder   08-12-2008, 22:48
#1

Hey,

How can I make a news article stick to the top of the home page? My goal is to have a welcome message followed by news posts for each event (album) shown on the home page.

Thanks
AMDbuilder

Administrator
Administrator
acrylian   09-12-2008, 10:02
#2

If this welcome message does not have to be a news articles you can call a page's content directly via printPageContent(). http://zenpage-functions.maltem.de/zenpage/_zenpage-template-functions.php.html#functionprintPageContent

If you really want to call a specific news articles you would have to use the Zenpage class methods:
$newsarticle = $current_zenpage->getNewsArticle();
http://zenpage-functions.maltem.de/zenpage/Zenpage.html#methodgetNewsArticle

That returns an array of the news article called you then can print as you like with for example: echo $newsarticle['content']etc.

NOTE: The next version of Zenpage will be slightly reworked regarding the class setup so it this setup will change a little.

Member
Member
amdbuilder   11-12-2008, 04:26
#3

Could you dumb that down a touch?

I got the news to show on the first page and then I post news about each event with a link to their albums. I don't really care what method the block of text welcoming people uses just tell me where I need to put what code.

Thanks
AMDbuilder

Administrator
Administrator
acrylian   11-12-2008, 10:54
#4

Just place something like ``(with the options mentioned on the link above) where you want to appear it on your theme's index.php. Where exactly of course depends on your theme's layout.

If you have problems to understand the functions guide please read:
http://www.zenphoto.org/2008/04/how-to-read-the-zenphoto-functions-guide/

More info about Zenphoto theming here:
http://www.zenphoto.org/2008/05/theming-tutorial/

and some more specific details for Zenpage here:
http://zenpage.maltem.de/pages/Theming-tutorial

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