Page 1 of 1

Filtering a menu by key word

Posted: Thu Oct 23, 2014 7:47 am
by Andrew Prior
I have a large number of articles which the client wants to show in a side menu ordered by the post date. Simple.

He also wants several subject pages which will only show a side menu of certain posts based on a subject. Their staff can manage by adding a tag into the "Extra Page Attribute 1"

It seems I should be able to use this by adjusting the menu template for each subject page, but have no idea how. I have discovered in the Menu Manager there is this setting

Code: Select all

$node->extra1
but can't work out if I can use it.

I can do all this manually by making pages that are internal content links but I can't see that working in their office context.

I'd be most grateful iff anyone could point me to some example code.

Re: Filtering a menu by key word

Posted: Thu Oct 23, 2014 9:28 am
by paulbaker
By "articles" do you mean Pages? I think they would be better if they were blog articles.

Your specification sounds a lot like CGBlog to me. I'd say creating code to do what you want with Pages is possible but you'd be re-inventing CGBlog.
client wants to show in a side menu ordered by the post date. Simple.
CGBlog's standard way of ordering posts.
Their staff can manage by adding a tag into the "Extra Page Attribute 1"
CGBlog categories.