yurj
(Yuri)
1
Hi!
I've a folder with a default view. For example:
https://mysite.com/afolder
this folder has a page as a default view. I would like to call a view on this page using something like:
https://mysite.com/afolder/@@defaultview/@@mymethod
I wouldn't like to name the id of the default page in the url like:
https://mysite.com/afolder/this-is-a-page/@@mymethod
so I can change the default page and links from outside still works.
Can Plone do this?
espenmn
(Espen)
2
Note sure if I understand, but if a folder (or similar) has a default page set, you can see this in /manage_main as 'default_page'.
So, you can check if 'default_page' exists and use it to construct an URL
There is also an index: is_default_page which tells you if an item is the default page.
yurj
(Yuri)
3
Thanks. There's also a @@default_page
view but it is not callable https://mysite.com/afolder/@@default_page.
petschki
(Peter Mathis)
4
the BrowserView @@default_page
has only 2 attributes: isDefaultPage
and getDefaultPage
wich are wrappers for the utilities here Products.CMFPlone/defaultpage.py at master · plone/Products.CMFPlone · GitHub ...