Reusable parts
|
May 27, 2008 10:50
7 posts
|
It is possible to have reusable parts? Example: I would like to include a different info (lets say: position) to each page, but I would like to have the Tab "position" already there when creating a new page. Creating the same tab everytime seams illogical to me. Or, when creating a new tab, can we have the option to choose one already created? Is there a way? thank you guys, frog is great! |
|
Aug 3, 2008 21:36
351 posts
|
This would be nice. I'd like to have different kinds of content rather than just pages or comments. I like aozuas's idea. I'd like to have an additional tab besides Pages and Comments on the dashboard. Say for example, Shows, and that would have the additional parts, like hours, dates, description, etc. Almost like a form. Used in conjunction with an appropriate template, it can support more varied website requirements. This way we can sort of have arbitrary content types, even if they are all saved to the same table in the database... Can this be done via a plugin? Basically - add a tab to the dashboard for the content type - make sure tabs for required 'parts' are displayed on that content type's creation form Maybe we just need to make custom plugins for each content type we need? I'm not sure how to go about that. Any pointers would be appreciated! |
|
Aug 3, 2008 21:45
351 posts
|
actually i was thinking the custom fields or 'parts' in frog could make it like other sites like drupal but no. the custom fields will not allow you to grab a listing of that content type. you are still limited to the page. that means if you do a custom field or 'parts' that create a ontent type called restuarnts for example. you can' t pull out a list of restaurants, list them alphabetically and so on. you still only have pages. each restaurant will have one page and that's all you get. so no actually wordpress and frog cannot handle this requirement. am i correct in saying so? |
|
Aug 3, 2008 21:45
351 posts
|
without extra tables and extensive hacking :) |
|
Aug 4, 2008 03:57
963 posts
|
I can't think of how Frog could do this, but I haven't given it much though, either. :) The best tool I know of for doing this kind of thing is Symphony, in fact it excels at it. It uses XML/XSLT/XPath, and makes pulling all such "bits" quite straightforward. I love using Frog -- but it possibly isn't the right tool for every job! |
|
Aug 4, 2008 06:41
963 posts
|
Just in case Symphony sounds attractive, this explation of its structure might help. Of course, if you've never looked at it before, it could just be plain confusing. :) But! If you have looked AND been confused, then that wee article could help. FWIW. |
|
Aug 4, 2008 06:42
277 posts
|
Hmmm, David, you've almost convert me to Symphony ... |
|
Aug 4, 2008 07:10
963 posts
|
@Bd - Haha! :) I use Symphony on a site where I specifically wanted to exploit XSLT/XPath capability. One way of thinking about Symphony is to see it as a means of querying an XML database (your entries) using Symphony XSL/XPath templates. That's the advantage! The disadvantage is that learning XML/etc. can be a stiff learning curve. I needed serious help to get my site going. Unless you need the querying-custom-fields feature, Frog is the much more straightforward system to use, IMO. |
|
Aug 4, 2008 11:11
458 posts
|
@ricks - I'm not entirely sure what it is you want/need, but it sounds as though writing a plugin for this kind of thing wouldn't be too difficult. Especially since I've gotten some practice on Frog programming lately. :-) Could you perhaps give a more extended example of what you want? |
|
Aug 4, 2008 12:02
7 posts
|
@mvdkleijn - Example: I would like to include a different info (lets say: position) to each page, but I would like to have the Tab "position" already there when creating a new page. Creating the same tab everytime seams illogical to me. Or, when creating a new tab, can we have the option to choose one already created? Is there a way? |
|
Aug 4, 2008 13:55
458 posts
|
@aozuas - Your request seems to be different from ricks, but I'll try to answer... Assuming you want the same content in your "position" tab, check out David's remarks at this post: http://forum.madebyfrog.com/forum/topic/407#post2253 Also see Philippe's reply at http://forum.madebyfrog.com/forum/topic/57 If you want the contents of the "position" tab to be different, but you just want the tab to be pre-created... that's currently not possible I think. |
|
Aug 4, 2008 14:15
7 posts
|
@mvdkleijn - well, seems that I create the topic and have never had an answer. Very strange, somebody "stole" my topic and now you are send me to another topic :) but serious: I want reusable parts, just the same as ricks wants. Isn't clear that? Or maybe my English is too bad? |
|
Aug 4, 2008 15:00
963 posts
|
@mvdkleijn : "If you want the contents of the "position" tab to be different, but you just want the tab to be pre-created... that's currently not possible I think." I just did some experimenting. It seems to be the case that if you create a child page, it has the same page-parts as the last created/saved page for that parent. It seemed to happen consistently. It would be interesting to know what happens for others here. @aozuas - sorry you didn't get your question answered! I don't think you want the same thing as Ricks, at least not what you describe in posts ##1 and 10! :) Try this:
Let us know how it goes! |
|
Aug 4, 2008 15:03
963 posts
|
That wasn't quite clear. I'll try again:
That's better. :) |
|
Aug 4, 2008 15:10
7 posts
|
Humm, yes, I really didn't express myself quite clear :) I do want the same as Ricks want. Or: he express better what we need. So, I will follow the solution for him (for us). Thanks for the effort David. |
|
Aug 5, 2008 08:24
458 posts
|
@David - just tried what you suggested... that worked nicely :-) A bit strange though, because I would expect a child of a page to contain the same tabs/page-parts as its parent... I wouldn't expect a sibling to however. Doesn't seem intuitive to me. |
|
Aug 5, 2008 15:41
351 posts
|
It was surprising to see the siblings inherit the parts, but I think it makes sense. Thanks for the heads up on the parts inheritance. That will make it easier then, yes. I guess the way it is now you can do quasi-content types. Then the only thing you need to do is write a plugin that will do the SQL query to search for the quasi-content type within the pages table, which you can identify by the unique combination of parts. A join table would be nicer, but I guess this would work. Once you can look up all the restaurants, for example. you can then list them all one one page by name and location or whatever you want. Restaurant listings are one example. Events are another example or staff members. I'm sure you can think of others. Generally it's nice to be able to do listings of a content type and then each of those listings goes to their own page. So a staff member woudl be listed on the general staff page, but when you click on his name it goes to his page that shows is biography or whatever. That's the basic idea behind having different content types. This way at the point of capturing the data, you can just fill out a form (or if we can't have a form, using tabs/parts), and don't worry about the rest of the page, because it all comes from a template. This behaves more like a database-driven website. In Drupal. everything is a node, but they allow different content types, which then get their own join table, pointing back to the record in the node table. Maybe it's possible to treat the pages table in Frogs sort of like nodes in Drupal? |
|
Aug 5, 2008 16:35
390 posts
|
well I do not have read all the conversation but I think that what you want is already done ... if you create a new part (tab) all brother or sister page will have it too !! @aozuas - position is already done !! you can drag and drop page and have access to |
|
Aug 5, 2008 16:59
963 posts
|
@Philippe - I think what ricks wants is this: if all sibling (brother/sister) pages have the same part, called for example "Name", then having a way to pull all the "Name" parts only out of all their pages, to be displayed on one single (different) page. A bit like "tags", but using page-parts instead. Does that make sense? And have I got that right?! |
|
Aug 5, 2008 18:06
390 posts
|
ok well I understand !! I have to figure that out !! |