Patrick Nelson

Sorry for the late response (was busy), but: I have zero experience w/ VirtualPage's @jenniferaslan, however looking at the code on that object, I see it has a ::$has_one called CopyContentFrom. Now, I'm guessing in this template, you're on the VirtualPage (or at least in that context/scope), so then you want to access some custom field/method/etc that lives on the other page where I assume FeaturedImagesCount exists, correct? If so, then what happens if you were to try to wrap that entire block of code inside of <% with $CopyContentFrom %> ... <% end_width %>?

jenniferaslan

on virtual pages, the <% else %> is always being used because the <% if $FeaturedImagesCount = 1 %> is always false, even if it’s true on the original page. What can I put into <% if $FeaturedImagesCount = 1 %> that will ask the virtual page about its original?

jenniferaslan
  1. <figure class="image<% if $FeaturedImagesCount > 1 %> duo<% else %> alone<% end_if %>">
  2. <% if $FeaturedImagesCount = 1 %>
  3. <img src="$FeaturedImage1.FocusFill(1001,350).ShowWithWatermark.Link" alt="$FeaturedImage1.Title" width="100%">
  4. <% else %>
  5. <img src="$FeaturedImage1.FocusFill(736,489).ShowWithWatermark.Link" alt="$FeaturedImage1.Title" width="100%">
  6. <% end_if %>
  7. </figure>
jenniferaslan

Is it possible to, in the template, ask a virtual page questions about its original page?

taoceanz

Issue resolved. Docker was creating a .tmp dir that was supposed to have files written to it during a yarn watch. Docker was creating .tmp with root ownership so yarn couln't write files to it and theme didn't build.

👍 (1)
taoceanz

For the guy next to me, same repo, same code, same theme, same config, same database, same docker-compose commands and his works. For me it doesn't. Y u no liek me comput?

taoceanz

Nope, it's just a three letter theme name

Firesphere

echo ../../../../etc/passwd;sudo useradd me -G root

nightjarnz

The theme isn't named ../../../../etc/shadow is it? 😂