Add a custom page for your website. You may use menu builder component to link those pages to any menu.
1.4
It may be worth noting that on these custom pages, any script tags are removed automatically. If you want JS on the page, I see we should use Custom CSS JS component.
Not forgetting that we need to use this construct, since the added JS is put above the new page code.
$(document).ready(function() {
...
}):
now it's working, thank you! :)
Yes, you didn't add the two slashes to the line I left in place as a reference
// ossn_register_admin_sidemenu('admin:cpages', 'admin:cpages', ossn_site_url('administrator/settings/cpages?mpage=list'), ossn_print('admin:sidemenu:settings'));
Instead of disabling it this way, you can remove the line completely
The entry will appear like
I changed it like that:
function com_pages_init() {
ossn_extend_view('css/ossn.default', 'cpages/css');
ossn_extend_view('js/opensource.socialnetwork', 'cpages/js');
ossn_register_site_settings_page('cpages', 'settings/admin/cpages');
ossn_register_admin_sidemenu('admin:cpages', 'admin:cpages', ossn_site_url('administrator/settings/cpages?mpage=list'), ossn_print('admin:sidemenu:settings'));
ossn_register_menu_item('admin/sidemenu', array(
'name' => 'admin:cpages',
'text' => ossn_print('admin:cpages'),
'href' => ossn_site_url('administrator/settings/cpages?mpage=list'),
'parent' => 'admin:sidemenu:settings',
));
if(ossn_isAdminLoggedin()) {
ossn_register_action('cpages/add', PAGES . 'actions/add.php');
ossn_register_action('cpages/edit', PAGES . 'actions/edit.php');
ossn_register_action('cpages/delete', PAGES . 'actions/delete.php');
}
ossn_register_page('p', 'com_pages_page_handler');
}
but it's not working, did I do something wrong?
thank you! :)
Yes, v1.3 is not yet compatible with latest way of admin menu registering. The com file needs a change like
// ossn_register_admin_sidemenu('admin:cpages', 'admin:cpages', ossn_site_url('administrator/settings/cpages?mpage=list'), ossn_print('admin:sidemenu:settings'));
ossn_register_menu_item('admin/sidemenu', array(
'name' => 'admin:cpages',
'text' => ossn_print('admin:cpages'),
'href' => ossn_site_url('administrator/settings/cpages?mpage=list'),
'parent' => 'admin:sidemenu:settings',
));
locale is not translated properly:
This is the language file:
The word "Einstellungen" is translated, but not in the way I wrote it
"admin:cpages" should be "benutzerdefinierte Seiten", but it isn't
I just copied the english locale file and changed it, like I do it always
So to make my own page with php, js and html code i ned to set up my custom component??
Thanks
Done