Jump to content

kater

Members
  • Posts

    132
  • Joined

  • Last visited

Everything posted by kater

  1. Hi, I'm doing something wrong here: I have following structure for an event page that allows for multiple additional dates if neccesary and i want to display all for this year: EVENT - event_begin - event_end - daterepeater -- daterepeater.event_begin -- daterepeater.event_end $thisyr=date(Y); $nxtyr=date(Y)+1; $aftnxtyr=date(Y)+2; echo "<h1>{$page->title}</h1>"; echo $thisyr; foreach($pages->find("event_ende|event_daterepeater.event_ende>=01/01/$thisyr,event_beginn|event_daterepeater.event_beginn<01/01/$nxtyr") as $s) { echo "<li><a href='{$s->url}'>{$s->title}</a>, {$s->event_beginn} - {$s->event_ende} | {$pages->get("$s->event_location")->title}</li>"; } Basically it works. The event page is found but the output happens only once and not for every matching entry in the repeater. Do i need a nested loop to output those (i might need it anyway to output the repeater dates but i'm still struggling with the find )?. thanks
  2. Yes i think PageTables is great and the way to go. However, i'll wait for the release to use it. This site will only live for one year so this time i just went for checkbox layout-choices in the template. It will render the pagelayout with one basic template / php. this is pretty simple and intuitive in the backend. bloats the template file a bit. cheers
  3. Thanks for your suggestions. I'm still reading through it.
  4. Cheers, I'm curious how those of you with much more experience would solve this: I have pages that may look like this: 1) title 2) large image (100% width) 3) text (100% width) 4) textblock with 50% width image 5) 10 images as gallery (5col 2 rows) 6) text (100% width) Those "elements" are freely choose- and stackable. However, i want to use plain text fields rather than html textareas. Very much like repeatable layout-modules in mailchimp templates. How would you approach this? My first idea was to use a parent page as article wrapper and output child pages which are based on individual templates. However, this negates the awesome simplicity of pw and might cause problems with searches. thanks!
  5. Hi owzim, thanks for your reply. Maybe i should add, i installed multilanguage support after setting up the site & using hanna codes. Yes, exactly. The pasted code works everywhere but through Hanna text formatter after i installed multilanguage support. Multilanguage itself seems to work properly. I removed the closing tag but with no difference. Yes, thats right. Unfortunately, i guess my problem lies somewhere else since it seems to strip/add them anyway. Also, it did work before multilanguage. Just a simple loop here. *** I just figured out, the (body/textarealanguage) field seems to strip all html entities. No matter which formatters are applied and if content type: Markup/HTML is selected. Same with tinyMCE or Textarea Editor. Strip tags is disabled. **** another detail: the code (used with hanna) works with any other field like name instead of title (PageTitleLanguage works fine in any other usage on the site). echo "<li><a href='{$s->url}'>{$s->name}</a>, {$s->event_beginn} : {$s->event_ende}</li>";
  6. Hi, Sorry, total noob alert. I have a couple php "Hanna Codes" which work just fine in the hanna code save&test area and directly executed from the template (both en/ger). However, when run though hanna code it stops the loop after the first title (also language independent). Without Hanna, everything works just fine. forgot to add: code stopped working after installing / setting up multilanguage support. before it was fine. Anything I'm missing here? Thank you! <?php $articles = $pages->find("parent=/events/ok"); foreach($articles as $s) echo "<li><a href='{$s->url}'>{$s->title}</a>, {$s->event_beginn} : {$s->event_ende}</li>"; ?>
×
×
  • Create New...