Jump to content

neophron

Members
  • Posts

    173
  • Joined

  • Last visited

  • Days Won

    1

neophron last won the day on August 29 2018

neophron had the most liked content!

1 Follower

Contact Methods

  • Website URL
    http://designport.info

Profile Information

  • Gender
    Male
  • Location
    Berlin

Recent Profile Visitors

2,864 profile views

neophron's Achievements

Sr. Member

Sr. Member (5/6)

87

Reputation

  1. Hi guys, in a website with a lot of fieldsetpages I want to show in this case accordions, only if a field (body) is populated. This is my faulty code: <?php if ($page->sectionfield_fa_membership->body) : ?> <section class="membership"> <ul uk-accordion> <li itemscope itemprop="mainEntity" itemtype="https://schema.org/Question"> <a class="uk-accordion-title" href> <p itemprop="name">Membership</p> </a> <div class="uk-accordion-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer"> <div itemprop="text"><?= $page->sectionfield_fa_membership->body; ?></div> </div> </li> </ul> </section> <?php endif ?> I'm getting this error: Attempt to read property "body" on null The logic is based on this code: <?php if ($page->body) { echo $page->body; } ?>
  2. Thanks for this cool explanation! I converted an existing website to a multilanguage site with DE and EN. After finishing all steps, I noticed, that in all fields the english tab was the active one. But it had to be the opposite way. So I deactivated / uninstalled the Core -> Language -> Languages Support - Tabs module. Logged out and in and reinstalled the Languages Support - Tabs module. And voilà, now all DE tabs are the active ones.
  3. Good day everyone, I'm wondering if this cool module could help me with the following structure, where all »sub-home« pages have the same template: home (mother page) —> navigation that shows only all child pages from the mother page - about - contact - news - sub-home A (template subhome) —> navigation that shows only all child pages from A -- about A -- contact A -- news A - sub-home B (template subhome) —> navigation that shows only all child pages from B -- about B -- contact B -- news B - sub-home C (template subhome) —> navigation that shows only all child pages from C -- about C -- contact C -- news C I'm using the markup regions templating. Most child pages use the same templates.
  4. Before I switched to PW, I worked with a german CMS (Contao). It stores all media in the classical way in an upload folder. I'm still managing such Contao websites, some of them are meanwhile about 10 years old. e.g. among them is a Contao website with a lot of PDFs, that are updating every 3 or 4 months. I'm trying to organize them in subfolders, but meanwhile it's getting messy. And this is where PW is really useful. Looking back on my website projects, I must say, that the PW file-concept was for most clients a better solution. Some of them worked before with Contao and they appreciated the upload fields in the PW backend. If there is a need for reusing the same image on different places, PW offers some solutions. Recently I purchased this: https://mediamanager.kongondo.com HAPPY NEW YEAR!
  5. Recently I transferred a website from WP to PW. First I had to clone the WP site in order to install it on a different hosting company. It turned out, that this WP installation (about 6 main pages and 20 subpages) with a few images, had the size of about 1 GB! This video helped me: https://www.youtube.com/watch?v=tIurrwfsCOg&list=LL&index=32&t=474s I found in the upload directory a lot of 7000px wide jpgs. Every time an image is uploaded, WP generates about 4 or 5 different size variations and keeps them all in the same directory. There were plugins installed, that all begged for an upgrade. Everywhere in the backend constantly informations from different sources popped up. After I finished the new website in PW, I compared the amount of the generated html code. The PW code was about 80% smaller.
  6. Now for everybody, who looks how to include files from a subdirectory: In site/templates/includes/menu_main.php render the file by: <?php echo wireRenderFile('includes/menu_main.php'); ?>
  7. Thanks for this hint. PW offers really a lot modifications. This is part of the html backend structure, seen from a non admin: <div class="PageListItem PageListTemplate_video PageListNoChildren PageListID1226 PageListStatusUnpublished secondary PageListStatusHidden PageListItemHover" data-numtotal="0" data-numchild="0"> <a href="#" title="/video-container/video-03/" class="PageListPage label"> <i class="icon fa fa-fw fa-video-camera"></i> Video 03 | video </a> ... </div> It would be cool, if {template.name} could be wrapped in a display: not span, that is loaded only if a user is logged in.
  8. Thanks a lot @BitPoet Nr 3 works fine 🙂
  9. I wanted to refresh this, cause meanwhile the new name of module is »Page List«. Modules --> Core --> Page List --> {title} | {template.name} But recently I noticed, that adding an icon to a template removes the template name. And now I have two questions: Is there a way to show both? Is there a way to hide the template names for non admins?
  10. Trying to get property 'media_manager_v_single' of non-object
  11. 10 years later! Searching for a getRandom() solution from a repeater, I stumbled upon this thread. I have the repeater_headline_movie_text with the field media_manager_v_single. My goal is to render only one repeater item randomly. This is my bad code: <? foreach ($page->repeater_headline_movie_text->getRandom() as $item) : ?> <article class="video_article"> <h3><?= $item->headline; ?></h3> <?php $out = $item->media_manager_v_single->each(function ($resource) { return "<video src='{$resource->media->url}' poster='{$resource->media->poster}' width='720' height='408' controls></video>"; }); echo $out; ?> <div class="textwrapper"> <?= $item->body_second; ?> </div> </article> <? endforeach; ?>
  12. Hi Adrian, thanks for your suggestion. Yes, now I see what's missing. The logic must be: Select the page, check if there is a field video_field inside and render the content. And I think that this php-logic causes me headache 😕
  13. Struggling with page reference inside repeater Hi, since the video files are usually bigger then some jpgs, I wanted to reuse uploaded video files on a website. There is a page reference field select_video inside a repeater. The file field for the videos is video_field. In a hidden page "video-container" are hidden child pages. Each child pages has a single video. I want to show each video via the page reference (inside a repeater) on a different page. In the field video_field under Basics -> Type the option Files is active. This is my code, where only headline and body_second are rendered. <? foreach ($page->repeater_headline_movie_text as $item) : ?> <h3><?= $item->headline; ?></h3> <article class="video_article"> <?php if ($item->select_video->id) : ?> <?php $file = $item->video_field; if($file) { echo "<video width='{1280}' height='{710}' poster='{$file->video_field->poster}' controls='controls' preload='yes'> <source type='video/mp4' src='{$file->video_field->url}' /> <track kind='subtitles' src='{subtitles}' srclang='de' /> </video> "; } ?> <?php endif; ?> <div class="textwrapper"> <?= $item->body_second; ?> </div> </article> <? endforeach; ?>
  14. Hi, maybe some of you already know this project: https://utopia.fyi They offer a type-, space- and grid-calculator for fluid design, no breakpoints. All these are actually clamp-clalculators.
×
×
  • Create New...