Re: [Radiant] Submenu

2006-09-18 Thread Ian Gordon
Dave Crossland wrote:
> On 18/09/06, Dave Crossland <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I have 2 snippets for my navigation.
> 
> See this in action at http://uk.tug.org :-)
> 
> --
> Regards,
> Dave

Thanks Dave I will definately give it a try and see how I can improve on 
it, if I can.

-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Submenu

2006-09-18 Thread Dave Crossland
On 18/09/06, Dave Crossland <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have 2 snippets for my navigation.

See this in action at http://uk.tug.org :-)

-- 
Regards,
Dave
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Submenu

2006-09-18 Thread Dave Crossland
Hi,

I have 2 snippets for my navigation.

1. Primary Navigation:

- 8< --


Site Navigation

Home
Membership
Events
Resources
Constitution
Baskerville
Contact
About



-- 8< --

2. SecondaryNavigation
-- 8< --
Breadcrumbs


Child Pages


→ 


And then this 'Normal' Layout:
-- 8< --
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en-US">










































-- 8< --

Note the smart way of including page-level CSS by just creating a
'stylesheet' Page Part in the Admin Interface, but if no part of that
name exists then the page does now show any signs of it. (Just added
to Receipes on Wiki :-)

I also want to follow the  to the secondarynavigation so instead of

Child Pages


→ 


I can do

Child Pages


→ 



But not had time yet :-)

-- 
Regards,
Dave
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Submenu

2006-09-18 Thread Wolfgang Wopperer
On our website, I implemented submenus the following way:

1. Create a submenu snippet:


  

  


This renders an unordered list of links to all children of a page. If 
some pages are to be excluded, you can do this by adding some 
 markup.

2. Create a content part "submenu" on each first levelpage that has 
children:


  


This calls the above snippet with the current page selected so that the 
snippet will iterate over its children and render its submenu.

3. Include the content part in your layout



The "inherit" attribute makes sure the submenu will be used on all child 
pages unless overridden.

It's a quick and rather non-DRY solution because you have to define the 
content part on each first level page and to manually enter the page 
title there, but from there everything works automatically. Highlighting 
etc. can be done with CSS - if you are interested, I can post some code.

Hope you can use it!

Cheers,
Wolfgang

-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Submenu

2006-09-18 Thread Kevin Ansfield
Bodhi wrote:
> 
> I've thought about doing something similar, but I just haven't had
> the time to get to it. I was thinking to make a tag very similar to
> the  tag, but instead of giving it a list of titles
> and paths, give it a parent page, eg:
> 
>   
> 
> and it uses the  and other navigation tags.
> 

Hmm, that's another possibility. I may try to tackle this today if I can 
get my head around how to best deal with the multiple levels and 
expanding the current section correctly.

-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Submenu

2006-09-17 Thread Ian Gordon
Here is an attempt at it.

submenu_behavior.rb

class SubMenuBehavior < Behavior::Base

  register "Sub Menu"

  description %{
Submenu is the ability for pages to have their parent and children 
automatically generated into 's for users.
  }

define_tags do
  tag 'submenu' do
'Create list'
  end

  tag 'submenu' do |tag|
name = tag.attr['exclude'] || 'array'
 ...
  exclude code here
 ...
  end

end

I don't even know ruby that well so this is all probably terribly wrong, 
you can laugh if you want :*-(




-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Submenu

2006-09-17 Thread Ian Gordon
I think we should get some code posted and people might be more apt to 
try and do something. Hmm, code, damn my newbie skills with ruby!

-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Submenu

2006-09-17 Thread Bodhi

On Sep 18, 2006, at 11:20 AM, Kevin Ansfield wrote:

> Ian Gordon wrote:
>> I don't know if anyone is currently working on or will be adding a  
>> kind
>> of menu functionality to Radiant. The idea being that there are
>> navigational element necessary to navigate the site's content areas.



> I am in need of something very similar to this and will probably be
> tackling the problem sometime in the week. Have you looked at the
> sitemap howto? That may be a good place to start.

I've thought about doing something similar, but I just haven't had  
the time to get to it. I was thinking to make a tag very similar to  
the  tag, but instead of giving it a list of titles  
and paths, give it a parent page, eg:

  

and it uses the  and other navigation tags.

Nothing but talk to show for it yet though... :)

Bodhi
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Submenu

2006-09-17 Thread Kevin Ansfield
Ian Gordon wrote:
> I don't know if anyone is currently working on or will be adding a kind 
> of menu functionality to Radiant. The idea being that there are 
> navigational element necessary to navigate the site's content areas.
> 
> The idea here is that for content, it automatically creates a  list 
> that you can manipulate to your liking.
> 
> So:
> 
> / -- root
>  + --- Home
>  + --- About Me
>  --- About the Site
>  + --- Database
>  --- Sub Section One
>  - Page One
>  - Page Two
>   Sub Page One
>  + --- Contact Me
> 
> This would be automatically created inside a tag, possibly something 
> like  which would have options to exclude pages and etc and 
> style to your liking, so only page relevant to the area show up.
> 
> I hope I am getting my idea across.

I am in need of something very similar to this and will probably be 
tackling the problem sometime in the week. Have you looked at the 
sitemap howto? That may be a good place to start.

Seancribbs also showed some interest in producing such a tag in IRC the 
other day although I'm not sure if anything came from that in the end.

Kev

-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Submenu

2006-09-17 Thread Ian Gordon
I don't know if anyone is currently working on or will be adding a kind 
of menu functionality to Radiant. The idea being that there are 
navigational element necessary to navigate the site's content areas.

The idea here is that for content, it automatically creates a  list 
that you can manipulate to your liking.

So:

/ -- root
 + --- Home
 + --- About Me
 --- About the Site
 + --- Database
 --- Sub Section One
 - Page One
 - Page Two
  Sub Page One
 + --- Contact Me

This would be automatically created inside a tag, possibly something 
like  which would have options to exclude pages and etc and 
style to your liking, so only page relevant to the area show up.

I hope I am getting my idea across.

-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant