2016-02-26, 17:44:03
(2015-12-30, 22:33:47)aldebaran Wrote: Re my post above about a request to work with single pages ...
It’s OK, I have done my own simple solution … it involves adding an extra function in the onepage plugin file … and is just a temporary workaround solution for me.
What I have done is :
a. Don’t define any child pages, just have all parent pages and assoc the pages you want with the menu to group together as a multipage. Call all other non menu pages ‘single pages’
b. Define a template for the multipage, and a template for a single page which is not part of the menu
c. For the multipage template, define as mvlek. Add links on the multipage template to single pages using the normal id url param
d. For a single page template ..
i. In the header define set_onepage_content … this is only to fetch all the slugs of the multipage so can do the menu
ii. For the menu for a single page I have added to the onepage plugin file a moded version of the get_onepage_navigation() function – call this get_onepage_navigation_multoone(), where instead of just href = ‘#<slug>’, I have href = ‘get_site_url(false)#<slug>’ (just pseudocode), for each slug in the onepage menu list
iii. For the menu call get_onepage_navigation_multoone()
iv. For the content, call get_i18n_content(return_page_slug()) instead of the normal get_page_content(), This is because get_page_content() just returns $content, but $content has been replace with the onepage content, but here we want the content defined by the slug sent with the url param ‘id’
e. So with this single page menu we navigate to the multipage AND to a specific page within the multipage
... if anyone is interested I can post the exact code details ..
Hi,
yes, I’m interesting...
Nice day from Slovenia,
Darko