Jump to content

jtborger

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by jtborger

  1. Hi all, Thanks for the replies. Sorry if my question wasn't clear. Well, it is a tagging system but with limited tags. And I use no module but just a page reference field. That field is set up as follows: Type=Page Dereference as:Multi Page (I'll change that) Selectable pages: from a certain parent which hold pages with a template (type=Tag) Input field type: Select I'll try this when finished this post. A question which comes up with me: OK if this works, great! But, how can I get the selected page(s) of a Page reference field when returning Multi Page array? Is there a sort of 'isSelected()' property of each page? Thanks Ryan for feedback on my recursive function. I can pass $level as an argument, of course. But I dont see the direct benefit of it, because if parent level is not level-1, then.... something is in error I guess? So I would assume it should be safe to rely on. I'd rather pass the least arguments in a recursive function. Don't know exactly why that is.. Perhaps just a preference. I'll check for NullPage or $parent->id. Thanks for the tip ! By the way I found out that with 'Dereference => Multi Page', the selected value = $field->last() . Is this a coincident and just a side effect? It seems to be right in the places where I implemented it so far. But I'll change to Single page anyway. It's easier for now. But I'm just curious.
  2. Hi, I have a global field assigned to all templates, called 'Channel'. It is a Page field, which links to a 'Tag' page (template) which only has a title field. This way I created a sort of 'channel tag' for content. Now, I try to get the channel value of a certain page. And somehow, this doesn't work. I have a recursive function: public static function getPageChannel($page) { $level = count($page->parents); var_dump($level,$page->name,$page->channel->title); if($level > 1) { self::getPageChannel($page->parent); } else if($level == 1) { return $page->channel; } } which prints out the stuff. But channel always returns a pageArray - which is OK. But then, How do I get the selected channel page? doing first() or whatever doesnt work cause I get the first option, not the chosen page (value). Must be thinking the wrong way. Feels a bit stupid because it must be something easy... (function is not finished yet, I know for the above example I can use $page->rootParent (equals $level==1). But when it does work returning channel value, I have it modified to return the first found channel value... up on the path).
  3. That is is a great choice I think and I have to get more experience on how to make the most use of what PW offers. Its true that the concept of PW is easy to find and that there is nothing hidden beyond the surface with all kinda those widget thingies which you must know before you can use them etc. The only reason I brought this up was I was wondering what the main design decisions were. I read the topic you mention and I understand how that approach can differ from a very basic '5 page website' approach. I just have to develop my own 'toolbox' for this approach (because I used MVC structures of those other frameworks (Zend and own brew stuff) and adapt it for PW use. What I wonder is how PW will stand up against 'IT managers departments' when it comes to proven technology and maintenance since PW doesn't offer guidelines for the structure and thus one doesn't know what he buys when he buys a website built with PW. Could be anything, from spaghetti to truly awesome OO, extensible and maintainable code. But for me as a developer, it's a good approach and possibly the best out there. because you can adhere your own style of coding and managing things. Which gives you a flying start. But I hope that PW gets accepted for larger companies too. Thanks for pointing me to the prependTemplateFile and appendTemplateFile variables. I just started a bit early with coding and skipping the config.php and without studying the skycrapers demo in detail. Thanks Ryan for your detailed reply and for all your work to ProcessWire and the community!
  4. Hi, Thanks. Perhaps I just have to get used to it. That will be a factor of great importance I'd like just to do it right the first time. And like efficiency I see what you mean, but there I think it gets 'dangerous'... It's something I wonder all the time: it seems that PW encourage it to indeed, use includes, and thus build your own library to use in your websites. Which is great. For me. But for someone else, when he is doing maintenance? I mean, certainly I profit from have some abstraction so I'll keep things DRY etcetera. But because there seems no real standard place or way to do that, isn't that some 'weakness' of the platform? And adoption by lets say enterprise or government? Don't know if that is the ambition, but I just wondered...Which doesn't mean that other platforms/CMSes dont suffer from the same stuff. But the more rigid it is... You get it. To put it the other way around: it is perhaps the most strong part of PW that it is so open, yet it might be the most weak part too, if you see what I mean? But I'll get my hands (more) dirty first before bringing up such issues seriously..
  5. Hi, Thanks for the replies. I'll try the alt-template filename. Still though you get an index template (no file, ok) for each index. Although PW is very flexible, I feel it is (or should be?) a little bit opinionated about how to solve these things. But I'll try and wait for more replies Just as MarcC says: And I'm fully aware of that. It's just the struggle of these kinds of systems. The good thing of PW is you make the mess yourself and it is a constistent mess, at least down to the core. Which aint the way with J****A...
  6. Hi, First, some introduction... I'm new on PW, just started yesterday evening and I'm very enthousiastic! I have 10 years+ enterprise experience in PHP (owning my own software company for 8 years). I have developed an enterprise CMS myself for lawyers, accountants and all sort of enterprise users which focusses towards handbooks (ISO and the likes) which is used by 2000+ companies (incl. government) in The Netherlands. Besides this, I just do some websites for friends and family in my spare time (which I do not have because I'm a dad of 3 too). I stumbled upon PW yesterday after I (again) completely freaked out at Joomla. I know this software when it was called Mambo 4.5.2 and I have created many componenents for it, knowing it from the inside. I always (after the first 3 months) hated it, but you know, when developing a small website it was the tool at hand for me because I knew it so well. And just every time I created a website I got frustrated, but well I got there and "OK, next". But this week, after 4 days of trying and reading and CCK extensions modules overrides custom layouts and all this stuff which makes me sick because its inconsistent as hell, I decided to just QUIT on joomla. It makes me cry. No joy in developing a small website. It's always about fitting in their model instead of the other way around. (And somehow, WP (which I don't know) feels the same way but different) Having said all this, did I mention I am very enthousiastic about PW? Well, I am. I have created in just one day (or half a day) what I wanted to do with Joomla and couldn't do it in four days. Even while I didn't got any sleep last night due to 5 weeks old baby etcetera. So, I'm happy with PW. Very happy. It just delivers. And I'm not familiar with the jQuery syntax (mostly used Mootools in my own software). It is just intuitive. I hope I stay this enthousiastic. But I'll gain some trust every step I make with it. Of course, there are a few things which I don't get directly, but I can search and read. But I wanted to just introduce myself and say a big THANKS for PW to Ryan and all the others. There is something I don't really grasp yet. Like this: I have several news items. These items are linked to from products. This works very nice But of course I want to have an index of all the news items. I can make a news-index template, and just make one. No problem. And then, I have a several review items, and several quotes. And I want them linked to products, no problem. But have an index too. Now, I can make 3 index pages. But somehow, they are similar to each other. Thus, Why don't create a 'polymorph' 'index' template. Which refers to a certain template (like, news, reviews, quotes) and loades all the items. Somehow, I just didn't came across this idea in the docs, wiki or forum. Perhaps I didn't read good enough, and I'm the first to admit I did not spent too much time with PW, but I'm curious if these kinds of concepts are 'the PW way to do things'. Another question/thought I have is about the data model. But thats maybe not the right place to ask right now....Is there something I can read about the thoughts and concept of the datamodel? Thanks in advance, I hope to use PW for my upcoming website projects and just want to finish my first stuff in the following weeks.. So you'll possibly see me some more on this forum. Ow by the way just one point of feedback: when doing my research yesterday, I thought that there were only video's available to get to know PW. After a while I stumbled upon the wiki and getting started links ! Wow. That saved time. But I wonder: why isn't that on the homepage? Every developer just wants to know about this I guess... After all the horrible forums with joomla 'experts' a forum isn't the first place I go look for documentation and help, you see..
×
×
  • Create New...