Message of the day:
Latest 3.x release: 3.7.3 - it runs on php 7! This is the channel for any SS3-related questions
Backend discussions on SilverStripe 3. For version 4 or newer, see #C36U3BDHN|ss4 or #C0QSDASKT|general. If you are using a version lower than SS3.4, please state, because it makes a difference!
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
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 %>?
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?
- <figure class="image<% if $FeaturedImagesCount > 1 %> duo<% else %> alone<% end_if %>">
- <% if $FeaturedImagesCount = 1 %>
- <img src="$FeaturedImage1.FocusFill(1001,350).ShowWithWatermark.Link" alt="$FeaturedImage1.Title" width="100%">
- <% else %>
- <img src="$FeaturedImage1.FocusFill(736,489).ShowWithWatermark.Link" alt="$FeaturedImage1.Title" width="100%">
- <% end_if %>
Is it possible to, in the template, ask a virtual page questions about its original page?
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.
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?
Nope, it's just a three letter theme name
echo ../../../../etc/passwd;sudo useradd me -G root
The theme isn't named
../../../../etc/shadow is it? 😂