hello
I am having trouble with the plugin multiple_layouts and news.
I have created a newscat.php and newsart.php which i select when i add a category and article but it works only for categories
Any idea what I can do?
Also, how can i sort news article by alphabetical order instead of by published date?
Thanks
Pat
Comments
1) I am not sure what does not work. What exactly did you do? You can assign layouts to categories and articles independently.
2) News articles follow blog style so it is always latest to oldest. If you wish a different order you need to code that via the object model right at the beginning on the theme files.
When i create a news category if i select the newscat template it works fine but it doesn't work for news articles.
I create a new article and no matter if i select templates : newsart or newscat, my articles always use the regular news.php template.
In other words I can't apply my modified news template to the articles, only to categories
Pat
Where exactly do i find this : object model right at the beginning on the theme files. ?
thanks
Zenpage item class objects have the methodes `setSortDirection()` and `setSortType()`
Info about the object model in general here:
http://www.zenphoto.org/news/zenphotos-object-model-framework
Documentation of the Zenpage classes related:
http://www.zenphoto.org/documentation/plugins/zenpage/ZenpageCategory.html
http://www.zenphoto.org/documentation/plugins/zenpage/Zenpage.html
This is a bit advanced coding.
I checked all the docs you sent me, i just started using this program and I am not familiar at all with, reading all this doesn't tell me anything..
You wrote it and must know exactly where i have to go to modify sort_order for the news....this is the information I ask.
Theme page `news.php` put at the beginning in the `head` for example:
`
$_zp_zenpage->setSortDirection($value, 'news'); where $value is true or false depending if you want descending or ascending order
$_zp_zenpage->setSortType('title', 'news'); // sorting by title
`
I had no idea i could add any code at the top of the file so i could have read the docs for life....
It's working now for alphabetical order, i keep searching why multiple_layouts don't work
thanks
I created custom templates for news articles to get rid of this sidebar on some pages, for this I deleted the code :
<?php if ($zpbase_newsstyle == 'blog-style') include ('inc/sidebar.php'); ?>
BUT this sidebar shows up anyway on my custom news articles templates (not on the news category), so there is something adding it but what?