#1 2003-11-25 18:47:04

@lex
Guest

include another page as default page

hello i wanted to know if it was possible to include a page instead of putting an image in the table of the index page

i have the 1.2 version. infact i would like to improve my first page by putting news instead of nothing..

i hope you understood me..  :-?

ps: i know i have to change something with

else
    {
        $output.= replace_space( $lang['no_category'] );
    }

bu i dont know what. i wait for your help..

THX for everything

 

#2 2003-11-25 22:54:37

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14068

Re: include another page as default page

try

Code:

include( 'relative/path/to/my/page.php' );

Offline

 

#3 2003-11-25 23:01:16

Guest
Guest

Re: include another page as default page

where do i have to put this code? i already tried but it does'nt work.. if i put this in the wrong place it will appear on all the page (pages with pictures)

so can u tell me where exactly i have to put this code in order to have an index page with ur menu on the left

 

#4 2003-11-25 23:24:32

Guest
Guest

Re: include another page as default page

infact it does work...

but the problem is that the page appears at the wrong place... it appears on the top of the menus et not on the right of the menu..

 

#5 2003-11-27 02:12:18

@lex
Guest

Re: include another page as default page

it was me but i forgot to put my name :-?  i have still the same problem: impossible to make an include after a lot of try.
this include has to be made here i think


if ( isset ( $page['cat'] ) )
    {
  if ( is_numeric( $page['cat'] ) )
  {
      $output.="<img src=\"images/photos.gif\"><br>";
      $output.= get_cat_display_name( $page['cat_name'], "<br />", "font-style:italic;" );
     
     
  }
  else
  {
      $output.= $page['cat_intitule'];
     
  }
    }
    else
    {
   
include( 'relative/path/to/my/page.php' );
 
    }

 

#6 2003-11-27 07:26:13

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14068

Re: include another page as default page

Yes, in fact, you need to use $output to store all the HTML data you want to display. In the page to include, you mustn't use any echo instruction. Example :

Code:

<?php
// file included by category.php
$output.= 'My page to include<br />';
?>

Offline

 

Board footer

Powered by FluxBB