Jump to content

Mazura

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Mazura

  1. Thank you very much!!!! All works.
  2. Is it impossible and I need to look for another way? Anybody...
  3. Ok, I figured it out. Not yet... I think, it should be something like: category.php if $page->parent->name=categories { $posts = $pages->find("template=post, categories=$page, limit=10"); ... } if $page->parent->name=years { $posts = $pages->find("template=post, years=$page, limit=10"); ... } But I am not a php programer, so I don,t know how to write it properly.
  4. 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.
×
×
  • Create New...