default single page view
Permalink
I have a tree of single pages all working well in the application folder. These are all referenced by name i.e.
controllers/single_page/admin/company/accounts/account.php
single_pages/admin/company/accounts/account.php
I now want to add a default single page such as
controllers/single_page/admin/company/accounts/controller.php
single_pages/admin/company/accounts/view.php
Every combination I have tried hasn't worked, I can't even get the view to display what am I doing wrong?
Thanks
controllers/single_page/admin/company/accounts/account.php
single_pages/admin/company/accounts/account.php
I now want to add a default single page such as
controllers/single_page/admin/company/accounts/controller.php
single_pages/admin/company/accounts/view.php
Every combination I have tried hasn't worked, I can't even get the view to display what am I doing wrong?
Thanks
You need them to be
HI,
Thanks for that idea, in fact I have that working fine.
The example I gave was maybe too basic, I have singlepage/controller pair working very well, its when the user visits the folder
single_pages/admin/company
How do I get a default view to load for that url, in this case maybe some basic company info. In previous versions I would drop in a view/controller pair and all would be good, in 5.8 it isnt working for me.
To take your example if I visit what would I expect to see?
single_pages/admin/company
This is a url, it has other sub urls below it with pages defined.
The default view could simply do a redirect to a page.
In the c5 core look in
/concrete/controllers/single_page and you will see accounts.php this is paired with /concrete/single_pages/accounts/view.php
I have tried to reproduce this in my application folder but it isnt even finding the view.
Thanks for that idea, in fact I have that working fine.
The example I gave was maybe too basic, I have singlepage/controller pair working very well, its when the user visits the folder
single_pages/admin/company
How do I get a default view to load for that url, in this case maybe some basic company info. In previous versions I would drop in a view/controller pair and all would be good, in 5.8 it isnt working for me.
To take your example if I visit what would I expect to see?
single_pages/admin/company
This is a url, it has other sub urls below it with pages defined.
The default view could simply do a redirect to a page.
In the c5 core look in
/concrete/controllers/single_page and you will see accounts.php this is paired with /concrete/single_pages/accounts/view.php
I have tried to reproduce this in my application folder but it isnt even finding the view.
If you are trying to see something at the URL /admin/company you would put the files at
controllers/single_page/admin/company.php single_pages/admin/company.php
With all of the valuable suggestions and solutions I came up with this which is working well.
controllers/single_page/admin/company.php
single_pages/admin/company/view.php
so visiting <url>/admin/company
will load the default view.php correctly.
The reasons for wanting to explore this approach include a better understanding of this method but also a precursor to me starting a big project to migrate a C5.6 to C5.8
Thanks for all the advice.
Martyn
controllers/single_page/admin/company.php
single_pages/admin/company/view.php
so visiting <url>/admin/company
will load the default view.php correctly.
The reasons for wanting to explore this approach include a better understanding of this method but also a precursor to me starting a big project to migrate a C5.6 to C5.8
Thanks for all the advice.
Martyn