Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3,007 profile views

jan's Achievements

Jr. Member

Jr. Member (3/6)



  1. Hi everybody, and sorry for my bad english in advance… I work often with ProcessWire, and I'd like to share my thoughts about some characteristics of ProcessWire that make work hard sometime. My thoughts are mostly based on the idea of making ProcessWire more flexible, but preserving it's simplicity. I think everybody who's working on websites daily, will recognize the problems I describe here. (I think it's got to do a lot with that thing "responsive layout" ) So I made a short presentation, which should be seen as a first step. I'm really looking forward to your feedback, community. (Presentation is attached as PDF at bottom of post). If you have any questions, please ask me. I'm also happy about other ideas, how to solve the problems described. Thank you! Presentation as PDF: ProcesswireFuture.pdf
  2. Thank you! This solved the error for me.
  3. Thank you for this very helpful piece of code, Ryan I use the sitemap for a multilanguage site (two languages only – en and de). Englisch is default (www.domain.net), German is de (www.domain.net/de) Referring to this article (https://support.google.com/webmasters/answer/2620865?hl=en or in German https://support.google.com/webmasters/answer/2620865?hl=de) I extended the "renderSitemapPage" function to indicate which page is a translation (and which language the current page is). It's not really automated / generic for more languages, and I also added "https://" manually. But it might be a help for someone. If anyone want's to optimize – you're welcome! function renderSitemapPage(Page $page) { return "\n<url>" . "\n\t<loc>" . $page->httpUrl . "</loc>" . "\n\t<lastmod>" . date("Y-m-d", $page->modified) . "</lastmod>" . "\n\t<xhtml:link rel='alternate' hreflang='de' href='https://". wire('config')->httpHost.$page->localUrl(wire('languages')->get("de")) . "' />" . "\n\t<xhtml:link rel='alternate' hreflang='en' href='". $page->httpUrl . "' />" . "\n</url>" . "\n<url>" . "\n\t<loc>https://". wire('config')->httpHost.$page->localUrl(wire('languages')->get("de")) . "</loc>" . "\n\t<lastmod>" . date("Y-m-d", $page->modified) . "</lastmod>" . "\n\t<xhtml:link rel='alternate' hreflang='en' href='". $page->httpUrl . "' />" . "\n\t<xhtml:link rel='alternate' hreflang='de' href='https://". wire('config')->httpHost.$page->localUrl(wire('languages')->get("de")) . "' />" . "\n</url>"; } With this function you only have to submit www.domain.net/sitemap/ to google to include both languges. Attention: www.domain.net/de/sitemap generates a faulty sitemap with the code above and should not be submitted to google. One more thing to do: To make the markup valide, you also have to add the namespace in the urlset-Element: function renderSitemapXML(array $paths = array()) { $out = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">';
  4. The issue was already reported in February: https://github.com/ryancramerdesign/ProcessHannaCode/issues/3 I now posted it to the Hanna Code thread: https://processwire.com/talk/topic/3745-hanna-code/page-10#entry75194
  5. jan

    Hanna Code

    Hi, I just can't find my github login, so I'd like to report a minor bug here. (I did cost me some hours…) In the description of the Hanna Code Name field is written, that hyphens are allowed in names: That's definitely not right. as you can read here: https://processwire.com/talk/topic/7123-embedding-css-grid-markup-in-textareackeditor/ Hanna Code Module is not working with additional parameters if hyphens are in the Hanna Code Name. This error was also reported on github in February here: https://github.com/ryancramerdesign/ProcessHannaCode/issues/3 The module is great anyway. So thanks a lot in advance!
  6. Oh my god!! I trusted so much in PW, I never thought this could be a problem!!!! Thank you a lot kongondo! And yes it is a hyphen. And it's also proofed in letters: Problem solved.
  7. I thinks it's not exactly your question, but I also remember a lot of problems with php mail and encoding… If every thing works in the body part of the mail, but you have issues with umlauts in the subject try: $subject = '=?UTF-8?B?'.base64_encode($subject).'?=; Good luck
  8. Thanks for all your efforts cstevensjr!!!! This is exactly what I'm trying to do. The tag="div" (as you can see on pic 1) is only a default value, if the parameter is not passed. No parameter is never passed at all All these do NOT work and do not render anything out: [[open-col-3,tag=div]] [[open-col-3, tag=div]] [[open-col-3 tag=div]] [[open-col-3 tag=div]] [[open-col-3 tag=aside]] and so on I'm 99% sure, something with the module is not working correctly. Perhaps the chief commander can say something about it! (<- this one somehow looks like Ryan, doesn't it?) Perhaps an issue that came within PW 2.5? I'd be really glad for an answer! That would be very kind! PS: Workaround for now is of course to make specific hanna codes for all occurring case like [[open-col-3-div], [[open-col-3-aside] and so on. Not a very elegant solution…
  9. I still don't get the clue. I refer to passing a variable to my php code via the hanna code attribute: I created two hanna codes: Then I selected "php" and preset the attribute "tag": On the code tab I echo the preset/ passed value of "tag": The hanna code renders well as long as I do not try to pass the attribute via hanna code: This works: [[open-col-3]] (result is: <div class="large-4 columns">) This does not: [[open-col-3 tag=aside]] (result should be: <aside class="large-4 columns">) So pleasssssssss tell me where my mistake is! Thanks so much!!
  10. Sorry, but I don't understand. If I use the preset param (via Basic tab -> Attributes, as mentioned above) it works perfectly! If I try to set it manually/ overwrite it via the shortcode attribute, it does not work. I also tried to simply echo the passed param inside <p></p>, which does not work either. Sorry if I missunderstood your reply. (I also created another seperate Hanna Code close-col to close the opened element and keep my code valide.)
  11. I have problems using the Hanna Code module. It works perfectly without parameters. But if I try to use params it fails. Here is my setup. I created a Hanna element named: open-col-3 In the attributes field I preset my param: elem=div My php in the code tab is: echo '<'.$elem.' class="large-4 columns">'; If I now use the shortcode in the content field of my page [[open-col-3]] it renders to <div class="large-4 columns"> If I try to pass the param like [[open-col-3, elem=section]] or [[open-col-3 elem=section]] it fails and no html is rendered. Does anyone have an idea why it's not working? I use PW 2.5.0 with CKeditor. Thanks in advance!!
  12. Currently I'm using Processwire and Foundation for a web project. Just came to the forums, did a search, found what I need and DONE. Thanks!
  13. Thank you very much!! This is the solution.
  14. Hi there, I have a template with a field type page. Now I try to remove one of the pages inside this field. I think I'm kind of blind – it won't do what I want it do foreach ($myPage->pageField as $pageInField) { if( /* condition to find page to remove */ ) { $myPage->pageField->remove($pageInField); break; } } Thank you!!!
  • Create New...