Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I18N OnePage
#2
(2015-11-28, 08:55:55)mvlcek Wrote: I have created the I18N OnePage plugin to simplify the creation of single page themes.  ...

Hi  mvlcek

I have quickly checked out your OnePage plugin v02.

Everything looks good, EXCEPT you have a typo in Onepage thread post  … which causes a TOTALLY BLANK html page ..  Reason : In  the forum OnePage plugin thread post for the while  loop code to set the OnePage content with slugs in menu order you call return_i18n_structure() … but  it looks like  return_i18n_structure()  DOES NOT EXIST. Instead return_i18n_page_structure() exists … do you mean this ?

I also noticed you have the same typo in i18n_navigation.php (v329) (the probable reason for above typo)  : In the public functions comment header you have “return_i18n_structure()”  but in the code in the same file there is no such function. Instead there is “return_i18n_page_structure()”    … I assume you mean this


a.  So using return_i18n_page_structure() instead of return_i18n_structure()  I used the following template code  … and all  works well  :

PHP Code:
<head>
 
 ......
 
 <! Setup OnePage content here --> 
 
 <?php 
      $slugs 
= array();
 
     $pages return_i18n_page_structure();  // Was return_i18n_structure() but does not exist
 
     foreach ($pages as $page) {
 
       $slugs[] = $page['url'];
 
     }
 
     set_onepage_content(false$slugs);
 
 ?>

  <!-- Insert meta tags Keywords, Description -->
  <!--  or <?php // get_header(); ?> -->
  <?php get_i18n_header(); ?>  

</head>

<body>
   .....   
   <div id="page-content">

      <!--  Insert OnePage content here -->
      <?php while (has_onepage_content()) { ?>
      
           <a name="<?php echo(return_onepage_slug()); ?>"></a>
           <h2><?php getPageField(return_onepage_slug(), "title"); ?></h2>
           <?php get_onepage_content(); ?>
           
      <?php ?>       

   </div>
   .....      
</body> 

b.    All   works well   …
i.    set_onepage_content(false, $slugs) works well   … with a manual list of slugs works well
ii.    Frontend language switching all works well  (I  currently have English and German )
iii.    The get_onepage_content() while (has_onepage_content()) works well, and the filter replace of the  (% gallery  %)  tags  (and the filtering for other plugins I have) is  good, and also the language switching of gallery captions is working   


c.    Suggestions   -  I know the following is not part of your plugin but it could be useful info … so that everything is in one place    

i.    I think the default Use Case for the Onepage plugin will be to  a) display all Backend (menu displayed) pages in one, and b)  have a menu with anchor hrefs  which link to each page part in the OnePage page    ..  Do you think so ?     

ii.    So if so, how about show this in the forum plugin post   ..  a) include an <a> tag line in the display while loop that you already have :

  <a name="<?php echo(return_onepage_slug()); ?>"></a>   

iii.    Explain about setting in the Backend the Custom Permalink Structure textfield to  #%slug%   …

iv.    Don’t include in the menu / OnePage the index page because the url for the index page would be <root>  and not  <root>/#index    (unless that could be changed ?)

v.    Also what’s the situation with template file choice in the Backend for each page ?  For a normal multipage solution, you can choose a different template file for each page, but obviously for a OnePage solution it makes no sense to define different template files  . .. I guess if you do, something must get ignored  .. I have not experimented  .. I have only used one file - the default template.php.  So for a OnePpage solution  what is the exact instruction  for how to define the template file in the Backend ?

Cheers Aldebaran
 
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: 2 Guest(s)