Jump to content

kongondo

PW-Moderators
  • Posts

    7,379
  • Joined

  • Last visited

  • Days Won

    139

Everything posted by kongondo

  1. Yep...several times...unless there's another cache I don't know of?
  2. I am not sure whether I am posting on the right thread... On one PW install (2.3.14 - dev), when viewing the modules page, I see the nice tabbed separation of modules, i.e. "Site", "Core", "New" (see screen). On all other sites I don't see "Core". This happens on all four new Admin themes. Am I missing something? Thanks.
  3. has_parent.... http://processwire.com/api/selectors/ http://cheatsheet.processwire.com/
  4. Thanks for the explanation Martijn....then as suggested in the docs, this is the way to go, no? [to make it foolproof] $page->siblings($selector) //or $page->next($pageArray) Can limit to 1, etc....
  5. ...I went ahead and hackishly implemented my feature request (edit next sibling) . Seems to work OK? Code: Github Short demo: Feature only implemented for pages minus "home", "hidden" and "unpublished". User is redirected (with a status message) to the page list when there is no next sibling to edit...I used page->next. Btw, I don't understand this quote ...I thought page->next will only grab one page (i.e. it is not an array but an object?)...
  6. Not sure if the following threads will help? http://processwire.com/talk/topic/5052-html-editing-in-pages-using-all-html-tags/ http://processwire.com/talk/topic/895-custom-styles-in-wysiwyg-editor/ And from the wiki... http://wiki.processwire.com/index.php/TinyMCE
  7. Hi Alice, Welcome to PW and the forums! Not a direct answer to your question but can you please confirm you have had a read here? http://processwire.com/api/multi-language-support/
  8. Stefan, It would have been good to start a new thread..especially given that this thread has been marked as "answered"
  9. Thanks for this Soma. I used it to easily install the Dev version of PW (just pointed it to PW on Github)...Worked like a charm..
  10. Soma, I don't think this is working in PW 2.3.14 (latest)....I don't get reminders to save..Only tested briefly in chrome...
  11. Aaaah...I knew there was a catch...Yes, redirect will take you to another URL... There's various ways to get round that. 1. Use render()....I gotta run...I'll explain this later if someone else doesn't or you don't look it up first ;-) - render the whole page being referenced.. 2. $pages->get() [if only interested in a particular field in the page selected via the page reference... EDIT: In addition to the code example by Adrian below Examples in the wiki: http://wiki.processwire.com/index.php/Including_a_page_in_another_page Good to know: http://processwire.com/talk/topic/4367-using-page-renderoptions-and-template-cache/
  12. Hi IntegralHack, Welcome to the forums (it seems you've been using PW for a bit already?)... Your question has two parts: 1. Redirect to another page 2. Use Page Reference Field to select the page to redirect to... For (1), similar question was asked a couple of hours ago (incidentally)..so, I'll just point you to that thread.... http://processwire.com/talk/topic/5413-setting-the-homepage/ For (2), you will just need to tell PW in your template file to redirect to the page selected in the reference field....Does this make sense or you need some code to look at? Similar question answered today here http://processwire.com/talk/topic/5414-selector-find-page-reference-help/ EDIT: Added example code... OK, just in case/for the next guy..... $session->redirect($page->singlePageReferenceField->url); ....where singlePageReferenceField is your, uh,...self-explanatory ;-) Also, note that you can use normal PW selectors to specify the page to redirect from (e.g. if page ID is 123, redirect to.....) in case you want to be more specific [e.g. in cases where a template is used by several pages and you only want to redirect from a specific page(s) and not others...Hope this makes sense...
  13. ....That's why "if" is your good friend...if (teamHasplayers) {echo "bazinga!"}....
  14. Hi PeterDK!, Welcome to ProcessWire and the forums! Nice to have you. OK, to your question. To redirect to the first child of a parent page, you can add the following code to the template file of the template of the landing page (in your case "root" and "en"): This code first checks to see if the landing page has children. If it does, it redirects to the first child's URL if($page->numChildren) $session->redirect($page->child()->url); OR This code directly redirects to the first child of the landing page (i.e. the parent page) without checking if there is a child first...the idea being if you wanted to redirect, you must have checked that there is a child to redirect to! $session->redirect($page->children->first()->url); These code are from the threads below. There are other ways to redirect to a particular child; Please read the threads: http://processwire.com/talk/topic/15-how-do-i-create-a-page-that-redirects-to-its-first-child/ http://processwire.com/talk/topic/2561-hide-landing-page-keeping-children-visible/ By the way, there could be other (better?) ways to organise your multilingual site rather than using a redirect on the homepage to nl. Feel free to Google our forums (e.g. multilingual site:processwire.com/talk OR EVEN blah blah site:processwire.com). Others may chip in. <i-digress>This is post #1000 for me!!!</i-digress>
  15. http://processwire.com/api/fieldtypes/images/
  16. Hi Jay, Nice seeing you here and thanks for the clarification. I don't wish to give this more mileage since no malice was meant but as you'll see in my post above, as a "MODX-er", I was one of the people "confused/appalled" as I know you guys..... Hope you guys are well..
  17. Hi Wilsea, Impressive summary of your initial take about the ins and outs of PW. Thanks. A few things need clarification: Pages - interesting further reading here by Joss It is important to understand the distinction between templates and template files. Templates do not have to have a template file with the same name as the template; you can tell PW you'll be using a different name. E.g. a Template called "Nit" can be associated with a Template File called "Picking". Template Files and not Templates display your data (in the fronted) Templates do not need to have a Template file Advanced template and template file approaches - classic thread by Soma and others. $page->first_name: in this case, there is a field on that page called first_name. If there isn't PW will complain very loudly Yes, fields are reusable. Some people get confused by this (not you). So, to further clarify, what it means is that you can add a field to as many different templates as you like and each of them (the field) will be a different instance of the field. It is important to add that removing fields from a template only removes the field's instance in that template and not in others. Also, you can't delete a field that is in use by any template. You can override the label of a field on a template by template basis (i.e. the instance of the field) For those who want to dig deeper: Each field (not each instance of the field) is actually a table in the PW database. The table will be named "field_field-name" (e.g. field_email). Each field instance is a row in that field's table Title field is not mandatory The only mandatory field in PW is Name. In the default install that ships with PW, Title is designated as a Global Field, hence required in all templates, hence its omnipresence. Hence, apart from name, in PW, all fields are custom fields. The name field is used to build the URL ...btw, the name and title of a page can be different Good job though! Cheers/k
  18. But maybe don't delete it from Github...anyway, I have it forked already....
  19. ...yes, they are different beasts I was just about to clarify that...will edit my post above... @Soma...maybe you want to make the above clearER in the JqueryDataTables thread?
  20. Adrian, did u install the new DT module (1.9.4) or the old one? (1.0.0) That looks like the old one ? Edited for clarity: In case you didn't know, these are different modules (one does not replace the other!)
  21. What!!!!!!! ? ? ? You are kidding, right? I can't believe this! Maybe it's a joke... I'll assume this is one person's view.. Anyway, .. Edit: Clarification
  22. +1 for "modals: install modules without leaving the ModulesManager page"
  23. Hi Hajo, Welcome to PW and the forums. You've made a good choice deciding to use PW These threads should help with your query http://processwire.com/talk/topic/15-how-do-i-create-a-page-that-redirects-to-its-first-child/ http://processwire.com/talk/topic/2561-hide-landing-page-keeping-children-visible/ I think you can modify the code there to fit your needs...using "if"... tip: Best way to search forum is Google... "my search terms" site:processwire.com/talk
×
×
  • Create New...