Jump to content

ngrmm

Members
  • Posts

    422
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by ngrmm

  1. @martijn yes, i added setlocale(LC_TIME, "de_DE.UTF8"); to the config.php
  2. and i treid it with this in the template-file utf8_encode(strftime('%d. %B %Y', $page->getUnformatted('date'))); still everthing in english
  3. thanks Jürgen. no luck. still in english i noticed that my html begins always like this: <html lang="en" … is that a problem?
  4. i did a multilanguage-install. english and german are needed i set german as default (install german languagepack at default) then add english (en) as second language my date-output is custom: %A %d %B %Y (Details Tab) echo $page->date the problem is that i always get the english ouput.
  5. @teppo thanks here the final code: <div class="pagination"> <?php $prevPage = $page->prev; $nextPage = $page->next; if($page != $pages->get(1019)->children->first()) { echo "<a class='link next' href='" . $prevPage->url . "' >"; foreach($prevPage->image as $image) { $thumb = $image->height(60); echo "<div><img src='" . $thumb->url . "'/></div>"; } echo "<span>". $prevPage->title ."</span>"; echo "<span class='date' >". $prevPage->teaser_date ."</span>"; echo "</a>"; } if($page != $pages->get(1019)->children->last()) { echo "<a class='link prev' href='" . $prevPage->url . "' >"; foreach($nextPage->image as $image) { $thumb = $image->height(60); echo "<div><img src='" . $thumb->url . "'/></div>"; } echo "<span>". $nextPage->title ."</span>"; echo "<span class='date' >". $nextPage->teaser_date ."</span>"; echo "</a>"; } ?> </div>
  6. thanks Marttijn i edited the code but still getting Internal Error there are always at least 3 children of that page (1019). and all of them aren't hidden. <div class="pagination"> <?php $prevPage = $page->prev; $nextPage = $page->next; if($page != $pages->get(1019)->children->first()) { echo "<a class='link prev' href='" . $prevPage->url . "' >" foreach($prevPage->image as $image) { $thumb = $image->height(60); echo "<div><img src='" . $thumb->url . "'/></div>"; } echo "<span>". $prevPage->title ."</span>"; echo "<span class='date' >". $prevPage->teaser_date ."</span>"; echo "</a>" } if($page != $pages->get(1019)->children->last()) { echo "<a class='link next' href='" . $nextPage->url . "' >" foreach($nextPage->image as $image) { $thumb = $image->height(60); echo "<div><img src='" . $thumb->url . "'/></div>"; } echo "<span>". $nextPage->title ."</span>"; echo "<span class='date' >". $nextPage->teaser_date ."</span>"; echo "</a>" } ?> </div>
  7. there is a pagination (next|prex) at the end of the page i want to hide next on the last page of the siblings and hide prev on the first <?php if($page != $pages->get(1019)->children->first()) { echo "<a class='link prev' href="$page->prev->url">"; foreach($page->prev->image as $image) { $thumb = $image->height(60); echo "<div><img src='$thumb->url'/></div>"; } $test = $page->prev; echo "<span> $test->title </span>"; echo "<span class='date' > $test->teaser_date </span>"; } echo '</a>' if($page != $pages->get(1019)->children->last()) { echo "<a class='link next' href="$page->next->url">"; foreach($page->next->image as $image) { $thumb = $image->height(60); echo "<div><img src='$thumb->url'/></div>"; } $test = $page->next; echo "<span> $test->title </span>"; echo "<span class='date' > $test->teaser_date </span>"; } echo "</a>"; ?> line 3: echo "<a class='link prev' href="$page->prev->url">"; is causing the error but i don't know why
  8. i changed the order and it worked if($box->text) { //text } else { //images } would be nice to know why it doesn't work the other way around
  9. thanks but it doesn't work i still get this <div class="box images" >…</div> <div class="box images" >…</div> <div class="box images" >…</div> <!-- this one below ist the repeater without images --> <div class="box images" ></div>
  10. i have a repeater with 2 fields – image – text if there are images uploaded then the output should be only the image field. if no images uploaded, then only the text-field should be shown right now, if the image-field is empty and the text-field is filled. i'm getting two boxes. and the first one is empty. <?php foreach($page->repeater as $box) { if($box->images) { ?> <div class="box images"> <?php foreach($box->images as $image) { echo "<img src='$image->url'/>"; } ?> </div> <?php } else { } if($box->text) { ?> <div class="box text"><?php echo $box->text; ?></div> <?php } } ?>
  11. i've the same problem with 1und1 my password is just text without ' or " any ideas?
  12. pages with the same template have a page-field. i can select multiple pages and they are like tags i output them like this <?php foreach($page->tag as $tags) { echo "<a href='$tags->url'>{$tags->title}</a>"; } ?> the tag-pages ($tags->url) should just show the pages with the certain tag selected. is there a way to filter? where in the documentation do i find something about this.
  13. i solved it with $('p img').unwrap(); maybe someone knows a better solution
  14. i am using CKEditor and want the design to be like the image below is there a way to get rid auf the <p>-tag around ther inserted image and also keep the <p>-tag around the text? <p>text</p> <p><img></p> <p>text</p> to <p></p> <img> <p></p>
×
×
  • Create New...