Behaviors and Views
|
4 posts
|
First off, I’m new to Frog, trying to figure it out. I’ve been evaluating a number of CMS apps, and so far Frog seems to be the best. However, I’ve found that Frog’s Pages system is missing a few attributes that I absolutely need. I’ve played with M’s Page Metadata and Page Part Forms plugins, and they are great but not quite what I looking for. In a nutshell, here are my needs: Each page needs to have a:
Frog’s Pages have the first two by default, and the the third with “page parts”. Four thru six can sort of be achieved with the Page Metadata and Page Part Forms plugins, but neither have the default functionality that I want. What I think I want to do is extend the Page class itself, and Frog Behaviors seem to be the way to do that. My theory is that I can create an Extended Page page type with the all the features I need. My questions (for now!) are:
My goal is to achieve the desired functionality without hacking Frog’s core. If Frog’s framework is as flexible as it’s layout/snippets system, this should be pretty straightforward. Thanks! |
|
1493 posts
|
You may have seen these notes already, and I’m not sure how much help you’ll find there in any case — but have a look at the Google Code wiki page for ‘Behavior’. |
|
11 posts
|
3. You can add a page part called “intro” to the pages you want and in layout add a code which checks for this page part and shows it if it is not empty. |
|
4 posts
|
@david: Yes, I saw that wiki entry. From the Behaviors wiki entry:
But there’s no info on how to deal with a new Behavior on the View level. @stas: For #4 what I was planning on doing was writing some sort of query for the home page that would retrieve all the pages with the promote_on_home_page attribute set to TRUE. Then it would display the Intro page part. For #5, yes there is a Published Date field in the Page metadata tab, but it doesn’t work quite the way I think it should. I want a page with a publish date set in the future to NOT be visible until that date, essentially act as though it has a status of Reviewed or Draft until that date. |
|
11 posts
|
4. I’ve decided not to change the Frog’s core, but write a plugin, which will add a “categories” functionality. This will add a new tab to the backend where you can create/manage your personal categories. Also this will add a list of labels on “Edit page” page where you can choose one or more categories for the page. For the front end this plugin will extend the page object with “categories” property, so you’ll be able display pages that belongs to one or more categories in the almost same way as display page’s children. |
|
1493 posts
|
@jedfoster – on #4 – you could readily do this with a page-part (e.g. “homepage-promo”), and with the word “true” or “false” in it, then use the cs_children_by_part plugin (link to plugin on MadeByFrog site > Extend) to pull the correct pages, aggregated from across your site. It works. It’s even easy, once it’s set up. ;) @stas – your “categories” sounds a lot like “tags” (see the Tagger plugin). What am I missing? @both – future-publishing has long been on the wish-list. It would be nice to have! |
|
11 posts
|
@David – Hmm… seems like I need to be more patient exploring list of plugins already written :) Thanks. @all – I still like an idea of writing plugin for future publishing and page expiration. The questions are: Should I: Any other ideas or wishes? I’m planing to write it on this weekend. |
|
4 posts
|
@david: I suppose that that all of my items could be achieved with page parts. However I really dislike the tabbed textarea layout of page parts. I need a form that is instantly recognizable and obvious. I want to be able to turn the website over to relatively inexperienced users. (see a screen shot below) Re: future publishing, I was envisioning a SQL query such as: @stas: I’d say go with your second option. I don’t see any reason NOT to use the existing `published_on` column; then all that’s needed is to extend whatever query Frog currently uses to retrieve published pages with a clause similar to what I wrote above. A “pending publication” status might also be useful, but wouldn’t be essential. I’d love to help out with this if you’d like. Shoot me an email at jed AT (my username) DOT com. @all: Thanks for weighing in on this. I really appreciate your input. If I can get this worked out, Frog could be a killer app for me. Here’s a screenshot of what I want my page edit scren to look like: |
