Hi,
I just noticed that when the Uuid is missing from a text file, the page will not load. I don’t know why a Uuid was not generated for that particular txt file and what can be done about it. Grateful for your suppport.
Hi,
I just noticed that when the Uuid is missing from a text file, the page will not load. I don’t know why a Uuid was not generated for that particular txt file and what can be done about it. Grateful for your suppport.
You can read about UUIDs here.
Where will it not load?
How was the page created? Manually, via the Panel, programmatically?
Hi,
The page was created programmatically and then I added the product via the panel.
I created two templates: soap.php and soaps.php. I then added soaps.txt inside the soap folder. When I click on Soaps in the navigation menu I only get the text ‘soaps’, the soaps.php template is not being loaded. This does not happen to the other pages that follow the same pattern.
Sorry, I don’t understand this explanation. Please show the resulting page tree in the filesystem with all content files they contain.
Sure, this is how it’s structured:
content / soap/ soaps.txt
templates / soap.php and soaps/php
The soap folder itself contains folders with the names of the soaps. Inside each of these different folders we have the picture of the soap, and a soap.txt file.
And what is the code in the soaps.php template?
Update: I recreated the folders and txt file for this specific product but no Uuid was generated in the soaps.txt file.
The UUID is created when you create a page via the Panel or with Page::create(), not when you just add them to the filesystem
This is the code of the soaps.php:
<?php snippet('header') ?>
<?php snippet('slideshow') ?>
<div class="products-container-two">
<article class="products-two">
<?php if ($p = page('soap')) : ?>
<?php foreach ($p->children() ->limit(15) as $soap): ?>
<div class="products-box-two">
<a href="<?= $soap->url() ?>">
<?php if ($image = $soap->image()): ?>
<img src="<?= $image->url() ?>">
<?php endif ?>
</a>
<div class="products-box-two-title"><h3><?= $soap->title()->html() ?></h3>
</div>
</div>
<?php endforeach ?>
<?php endif ?>
</article>
</div>
<?php snippet('zitat') ?>
<?php snippet('info-block') ?>
<?php snippet('footer') ?>
Thank you for explaining this. Interestingly, the Uuid did show inside the txt files for other products but not for this specific product despite me following the same creation pattern of the other products.
But anyway, a missing UUID is not responsible for your pages list not showing up, since you are not using the UUID to fetch the page.
Maybe create a repo on Github, so that we can have a look at the code. This is somehow not leading anywhere.
Many thanks for your support.
I was able to solve the problem by deleting the default.txt file inside the soap folder as well as inside the other folders for the different products. soaps.php is now showing when I click on soaps in the navigation menu. It seems that it was conflicting with the soaps.txt file. ![]()
You can only ever have one content txt file in a folder.
Yes, it’s good to know that indeed. ![]()
If you had done this, we could have solved this hours ago. That’s what I mean, if I ask you do things, it is for a reason, so that we don’t go about an issue for hours. I’m usually a very patient person, but you might have noticed that I’m starting to lose my temper. Especially, since most of your questions could be solved by reading the documentation.
The documentation are not always easy for me to understand as a beginner. Sorry, next time, I’ll make a screenshot. Thank you for your support.