Hello. Can you help me?
I work with Blog Profile.
There is a subnav "Categories" in the left panel. I need one more subnav "Years".
So I created new field "years", page "years" with template "categories", and child pages: "3-5_years", "7-8_years"... with "category" template (the same as for "Categories" subnav). And then filled it in all posts.
Next, I added new lines here:
1. blog.inc
$subnav = ''; // subnav, as it appears in the left sidebar
-> $subnav_years = '';
2. home.php
$categories = $pages->get('/categories/');
-> $years = $pages->get('/years/');
$subnav = renderNav($categories->title, $categories->children);
-> $subnav_years = renderNav($years->title, $years->children);
3. And now, if i choose only one line in category.php
$posts = $pages->find("template=post, categories=$page, limit=10");
//$posts = $pages->find("template=post, years=$page, limit=10");
or
//$posts = $pages->find("template=post, categories=$page, limit=10");
$posts = $pages->find("template=post, years=$page, limit=10");
then I can see blogs only for selected "categories" or for "years" respectively.
But if i do two line:
$posts = $pages->find("template=post, categories=$page, limit=10");
$posts = $pages->find("template=post, years=$page, limit=10");
only last will work. And it is "No posts found" for first line.
But I need two subnav work properly at the same time. I should use || , i think. But don't know how.