FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Menu plugin

Feed 13 posts, 7 voices

Avatar
2 posts

Hiya, i’ve just joined the forum, I really like frog cms. I think one good plugin would be a menu editor you can add links in your menu that link to other websites if anyone knows how to do this i would be very greatful.

thanks

 
Avatar
316 posts

In what way smithy? Menus can be usually be edited in the appropriate Layout or snippet.

 
Avatar
486 posts

I recall that someone is working on a blogroll plugin….

 
Avatar
316 posts

Yup, BD is working on one. I don’t think it has been released yet.

 
Avatar
343 posts

Oh, time is passing so fast. I don’t want to make stupid promises, but it will be released soon. I have it done, Tyler (mtylerb) knows the plugin, but I have to make a little changes.

 
Avatar
2 posts

What I mean is so a client for example can their own menu items that dont link to a page on the site but to like a pdf file or another website.

 
Avatar
316 posts

You could always embed a snippet into the navigation area.

Then just have the client edit the snippet to create whatever menu they want. They would need to know html, though.

 
Avatar
1493 posts

Hi Smithy: I think I have a solution for you… Here’s what you might do:

1. Make a new child-of-root (i.e., in the Pages section of the Admin, click the green “+” icon beside the Home Page), call it what you like, but I’ll call it “Client Menu” for this post. Set the status to Hidden and save it. (It doesn’t need any content.)

2. Make a child of “Client Menu” – the Title should be the menu entry text, and then in the body (filter set to -none-) just copy/paste in the URL you want for the link. Your client should be able to do this, too! (No HTML knowledge required!) An example might be:

  • title = Made By Frog
  • body = http://www.madebyfrog.com/

or,

  • title = Framework Cheatsheet
  • body = http://www.tbeckett.net/docs/FrameworkPHP-cheatsheet.pdf

3. In the sidebar, or wherever you want the client’s menu to appear, put this code:

<h3>Client Menu</h3>

<?php $cMenu = $this->find('/client-menu/'); ?>
<ul>
<?php foreach ($cMenu->children(array()) as $cMenuItem): ?>
  <li><a href="<?php echo $cMenuItem->content(); ?>"><?php echo $cMenuItem->title(); ?></a></li> 
<?php endforeach; ?>
</ul>

You’ll see that’s just a variant of the “Recent Articles” code in the default Frog setup. The client can re-order items simply by using the drag-drop feature for page ordering in the admin. They can then add/delete/order their menu, simply by adding/deleting/ordering these “pages”.

Seems easy enough! But of course, this won’t integrate with the site’s menu. You could conceivably style it to look continuous with the site menu, I suppose, if that was the goal…

Hope that helps!

 
Avatar
2 posts

Hiya, sorry it’s been so long, thanks for the replies i’ll try that one out.

 
Avatar
651 posts

Hi guys… (off-topic: I wonder if we have any female users?)

I’ve been thinking about this menu plugin request. What if… and this is just a what if… you could set page types (behaviours anyone?) that would remove the Body field when adding/editing a page and would replace it with say…

a dropdown box that allows you to select a gallery…
an input field that allows you to enter a URL….

You’d then save the “page” and the page’s entry in the menu would become a link to the gallery or plugin. No need to edit PHP… No need for a separate menu plugin… it would (probably) be enough to simply add an event or two and change the workings of storing a page a bit maybe?

What do you think about the concept itself? (before we start thinking more about the actual feasability and implementation?)

 
Avatar
31 posts

I really like the idea. Makes it more flexible.

I’ve been looking for a way to make “section headings”, using the ‘Sitemap-like navigation for Sub-areas’ form the cookbook.

Let me explain in a simplified example:

A site menu:

- home

- results:

– 2008

- 2007

- contact

In this example i have no need for the page ‘results’ to be an actual page with content. It would suffice to be an “section heading”. This would also mean that ideally there shouldn’t be a (empty) link. An “section heading” page type could work for this.

Anyways, it’s just a thought. I indeed like the concept, i have too little knowledge to think about an actual implementation.

 
Avatar
1493 posts

@mvdkleijn – really like that line of thought. Could open up some great possibilities.

@tunnis – somebody asked about that kind of menu. If you wanted to use it right away, you could — but Martijn’s suggestion would make things (a) more elegant, and (b) more automated. Both good!

 
Avatar
486 posts

it would (probably) be enough to simply add an event or two and change the workings of storing a page a bit maybe?

Is this in any way related to what were talking about before here and here ?

 
Avatar
651 posts

Yes and no ricks. What I’m talking about is making the Pages system & tab just a little more flexible to allow people to insert something else than a “Body” of text. This would allow the “Pages” tab to behave more like a “Menu” tab as it were.

The actual implementation of new behavior would be something else. (but offcourse, implementing this would probably get you a step closer to what you’re trying to achieve aswell ;-)