Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Not sure what you're about. But this should give a select menu dropdown $treeMenu = $modules->get("MarkupSimpleNavigation"); echo $treeMenu->render( array( 'collapsed' => true, 'max_levels' => 1, 'outer_tpl' => "<select>||</select>", 'list_tpl' => "||", 'item_tpl' => "<option value='{url}'>{title}</option>" ) );
  2. Some common problem I think is that people forget to enable urlSegments on the gateway templates /en/ /it/. Only thing I can think for now.
  3. moreweb, I don't know since I don't see how you set everything up. And without specific errors or more details what doesn't work I can't help. I can't do much with things like: "example.com/en/ -> en, not works, not ok" All I can say for now is it works fine, as it should. I can switch it on and off and everything works.
  4. Page field is a page relation and stored as every field in PW in a own table. Dont worry about performance. How many pages are we talking about if you say lots?
  5. Cool thanks for writing. Extending "Process" in a module is meant for admin pages. Each admin page has the admin template and a process attached. For normal modules you extend "Wire" or "WireData", if you want to create hooks and all sort of helper modules. For more infos look at what Ryan wrote here: http://wiki.processwire.com/index.php/Module_Creation
  6. On the page with the page field, output all references foreach($page->yourpagefield as $pr){ echo "<a href='{$pr->url}'>$pr->title</a>"; } On another page that is referenced, search all pages that have "me" referenced: $pa = $pages->find("yourpagefield=$page"); // $page is the current page foreach($pa as $p){ echo "<a href='{$p->url}'>$p->title</a>"; }
  7. Great module! Thanks Adam for doing it, great job. 1. I enabled invis and everytime I save the page there's some chars appended in the editor like -> -> -> I use MD textformatter, and have use focus mode on. Not sure what's happening. 3. Also I get some warning when debug mode on in admin: "Notice: Trying to get property of non-object in /xxx/site/modules/InputfieldAceEditor/InputfieldAceEditor.module on line 125 Changing it to "if($field && $field->textformatters)" removes it. 2. Don't know if it's possible anway, but would be maybe nice if the "editor" area would be drag sizable in height like textareas. Keep up the good work.
  8. Don't use images in text wysiwag. Seriously. I think u can avoid a lot of issues. Think if you replace img with a different size and ratio. I stoped doing it and use other ways a long time ago. You just give away control, and editors start to think they need to do design. All websites we done with free images in text are horrible after 1 month in hand of a client and lots of maintenance needed. Use repeater to make blocks with images and a option to align or size. Or intext tags where to put image. Theres even a module. And your back in control. And other nice effect.
  9. fmgujju, Can you check on processwire.net? I just made it a little larger, which can't hurt. Well thinking about it, it looks really strange on your computer, as if font smothing isn't on for your browser under a certain fon size (i'm sure it's this).
  10. Thanks much for the feedback. That's nice of you. Well Chrome != Chrome, looks like you're on Windows? It looks top sharp on Chrome OSX. That's how it looks for me. So changing it to other font-weight will make it look to bold here . But I'm sure we can look into it, but have to say it's the usual webfont != webfont != browser != os. Never can get it perfect for all except chosing Arial or Verdana. I'm sure you know already. Well, maybe just a tin larger will make it look better.
  11. Maybe you could provide the full code of your module? $this->fuel->set("bla", $this); works fine.
  12. Isn't good for search-engine ranking? Really? Don't think so. You would never give or render a url "/about-us" anyway in your site, so what is the problem again? Google won't ever think there's "/about-us" and in case someone enters a link like this it will get redirected (301) to the one with slash. There's not 2 urls that work, only one. The one without get's redirected. Never ever seen or heard or experienced any issue with such things regarding search engines or SEO. Once you start messing around with it, like some with and some without and some that have children have one and pages without don't, will make things difficult changing it will give maybe some problems with search engines. IMHO this discussion about trailing slash is far from being relevant at all. So I don't need an answer or think there's none. Personal taste and influenced by how you think it should be
  13. Error Call to a member function get_apikey() on a non-object in this case $mailchimp isn't an object. Maybe you have set autload to true after installing module? Try reinstall it, as it won't change it if youc hange the code solely. This is if you call $this inside an static method.
  14. A quick look on the cheat sheet with "status" would have revealed it: http://processwire.com/api/cheatsheet/?advanced=true&filter=status
  15. Be careful if you have carfull.
  16. I would do with options or checkboxes to the load different templates and views in the template php. Or it is possible too change template file before rendering. Theres so many ways and many things are possible. Looks like some sort of controller on temtplate of your multicontent page is best way togo. Feel free and start build something and learn do thing different as your used to from another cms.
  17. Thanks for writing this. There's many ways and different use cases, and that's hard to write everything down to not get to lengthy. Some thoughts. This technique with pages and a page field or without can be used for various things. You can build such helper pages to build a select on the frontend only and render the options in a foreach. Doing it this way you benefit from being able to add and move options in the admin page tree, and allow the editor to even edit or add to them. And all stays in the same manner as all other pages. I can tell my clients "well there's the pages that make these options and they know how already". Being everything accessible through API so easy, would make it easy to even build some little tool in the backend to manage those options outside the page tree, to go even further. Also those page references are great for doing categories, tagging, ingredients, .. whatever. And later those pages can be even used in your site and make them accessible and give them a template. There you then show all pages that have a reference to the currently viewed category. I've for example created a whole shop where the navigation are the categories and articles are just linked to some category and display when browsing the category tree. And best of all it stays flexible and can be adapted or expanded in no time with no limits. One could write down a whole book solely on this subject as it's endless, but guess nobody would buy it. Creativity is what I enjoy in PW. One thing about selects having a empty option. This is simply to be able to "deselect" it in the admin. So if you use page field select for doing something on the frontend you would use usually check for if not empty to determine if anything at all. So your example could aswell be like this: if ($yesno) { // anything selected? if($yesno == "yes") { echo "Say Yes"; } elseif ($yesno == "maybe") { echo "Shrug your shoulders"; } elseif ($yesno == "no") { echo "not a chance"; } } No need to write === here, == is sufficient I think when comparing strings. You do triple === usually on comparing objects.
  18. I'm a little confused as to what you're doing here Why are you querying the db manually? Those fields and table are custom and video is the id of a page in PW? Well does the db query return any result at all? Any errors? What if you leave out the .id in category.id? Have you tried a fiend instead of a filter?
  19. Awesome! Thank you very much.
  20. Firefox cant backgroundPositionX as I used. Would have to make another script or use backgroundPosition : x y. But im not sure the relative px declaration -= will work.
  21. I don't know how. But I think if you add "-div" to the valid elements it will get removed if empty. Edit: typo
  22. This forum slowly turns into a stackoverflow. Works fine like this in all browsers: http://jsfiddle.net/mYYYF/2/
  23. Sorry, thanks for reporting, for some reason my module repo code was altered at some point, and not consistent anymore with my dev code Should be fixed now.
×
×
  • Create New...