Forum
Wrong preview path
I have a onepage with different sections. They are organised them with «set_page» in the region section of the backend to have a better overview. Now when I click «Page preview» in a section I see the page without CSS styles, it gives out the following link: https://www.domain.ch/index.php/section_name. In fact the website path is https://www.clixx.ch/index.php/
The path for the first section is correct, in the page options under Path it shows «/index.php».
All other sections show «/index.php/section_name» what does not show the CSS styles. Seems that they are treated as subpages what they are not... The Subfolder path there is «/index.php».
Any idea? Should the path not be «/index.php/#section_name»? But what is when I change this? Will the content disappear? Why is the path wrong?
Thanks a lot!
What value have you set for the single item URL in the region settings?
Inside the index.php file I set: <?php PerchSystem::set_page('/index.php/section_name'); ?>
That's probably wrong? When yes, can I change without loosing content?
Thanks!
In the region options, what value have you set for "URL for single items"?
I have only Location > Path, which is for a section '/index.php/section_name'. Where do I find "URL for single items"?
In your Region Options.
In the region options, what value have you set for "URL for single items"?
Ok, sorry I was in page options... So, there is nothing set for "URL for single items". What should it be so for a section in a onepage? Just #section_name?
Many thanks!
Yes, try something like
/#contact
for example.Ok, this works for a region inside a section. But, my problem is that the section preview (show page one level higher than you mean) is without CSS styles. When I change the path there, of course all that content will be deleted! So I think I have to change these links from «/index.php/contact» to «/#contact». Is there a way to do without loosing content?
I don't understand what you mean by the content being deleted. You'd have to delete the content yourself for it to be deleted.
If your CSS isn't displaying, that's probably just down to the path you're using to reference it. Is the path root-relative?
I organise the sections in different regions for a better overview in the backend using your solution of «set_page».
Staying in your example (section «contact») I show you what I have for each section:
<?php PerchSystem::set_page('index.php/contact'); ?> <section id="contact"> <!-- some content --> </section>
This gives to me in the page section of Perch the following Location > Path: «/index.php/contact» of course. But I think it should be «/index.php#contact», right? Now, the problem is, when I change that my content of the contact section disappears...
After changing the location, go into Perch and update the page path to match.
That's it. And nothing is deleted. Thanks a lot! :-)