Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I18N OnePage
#10
(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
Reply


Messages In This Thread
I18N OnePage - by mvlcek - 2015-11-28, 08:55:55
RE: I18N OnePage - by aldebaran - 2015-11-30, 21:30:00
RE: I18N OnePage - by mvlcek - 2015-12-02, 06:35:43
RE: I18N OnePage - by shawn_a - 2015-12-02, 09:13:25
RE: I18N OnePage - by mvlcek - 2015-12-02, 16:57:09
RE: I18N OnePage - by aldebaran - 2015-12-03, 21:38:20
RE: I18N OnePage - by shawn_a - 2015-12-05, 08:04:55
RE: I18N OnePage - by aldebaran - 2015-12-17, 00:54:18
RE: I18N OnePage - by aldebaran - 2015-12-30, 22:33:47
RE: I18N OnePage - by cvrglj - 2016-02-26, 17:44:03
RE: I18N OnePage - by retrofan - 2017-01-03, 19:37:42
RE: I18N OnePage - by pikku - 2017-04-14, 23:52:44
RE: I18N OnePage - by jjancel - 2021-02-17, 05:48:37
RE: I18N OnePage - by datiswous - 2021-02-22, 08:25:12
RE: I18N OnePage - by Oleg06 - 2021-02-22, 08:30:08
RE: I18N OnePage - by jjancel - 2021-03-15, 09:27:16
RE: I18N OnePage - by Oleg06 - 2021-03-15, 18:39:17
RE: I18N OnePage - by Felix - 2021-03-18, 21:11:36
RE: I18N OnePage - by Oleg06 - 2021-03-18, 23:11:47
RE: I18N OnePage - by jjancel - 2021-03-26, 04:40:14
RE: I18N OnePage - by Oleg06 - 2021-03-26, 05:46:28
RE: I18N OnePage - by jjancel - 2021-03-30, 03:38:36
RE: I18N OnePage - by Felix - 2021-03-30, 03:51:37
RE: I18N OnePage - by jjancel - 2021-03-30, 04:20:02
RE: I18N OnePage - by jjancel - 2021-03-30, 04:38:17
RE: I18N OnePage - by Felix - 2021-03-30, 05:26:26
RE: I18N OnePage - by jjancel - 2021-04-02, 00:48:28
RE: I18N OnePage - by Oleg06 - 2021-04-02, 01:45:48
RE: I18N OnePage - by Felix - 2021-04-02, 00:57:40
RE: I18N OnePage - by jjancel - 2021-04-02, 03:18:04
RE: I18N OnePage - by Oleg06 - 2021-04-24, 19:19:12
RE: I18N OnePage - by Felix - 2021-04-02, 03:32:00



Users browsing this thread: 3 Guest(s)