How to add new customized page

mad

No avatar

2006-09-19 19:29

Hello. I have some questions:
1. I want to create new pages like a newsletter. I put a file with the code of newsletter in templates/newsletter.tpl. I open index.php to add a link to that file, but where? :) I want something like shop_directory/index.php?p=Newsletter
2. I can create customized page? I want a page product with category menu at left and a page without that menu, like the first page on a website with new promotions. When i click on Products, in a menu, appears ProductList with that menu
3. I want to remove the "add to cart" button with a flash button. What to modify?
Thanks :)

treewood (OpenSolution)

Avatar: treewood

2006-09-19 21:05

mad - create link in page.tpl in top menu for example and create if in index.php for example:

if( $p == 'Newsletter' ){
  
// here put something
  
$bDisplayedPage true;
}

before it: if( is_file( $sActionFile ) )
this is answer for first question ... one problem = one topic

mad

No avatar

2006-09-19 21:57

Thank you

idaryl

Avatar: idaryl

2007-01-15 07:40

This is for treewood - I understand how to place an extra link in the top menu, but as far as where the rest of it is concerned???

I have a .html page as .php (I'm assuming that the index.php will only load a php file into itself. Or do I generate a html file and call it newsletter.tpl?

You state that adding an if statement will do a call to the page? ( // here put something) is that the entire page code?

I'm lost - really - can you post an example? this would really help a lot

Let me know

idaryl

Avatar: idaryl

2007-01-15 08:49

and what would the link be? <li><a href="?p=newsletter">Newsletter</a></li>

... ?

Let me know

panos

No avatar

2007-01-19 02:14

idaryl
in page.tpl you see this code

<ul>$sContentsMenu
<li><a href="?p=productsList">$lang[products]</a></li>
<li><a href="?p=ordersBasket">$lang[basket]</a></li>

if you wont add one more page
add this

<li><a href="?p=productsList">$lang[products]</a></li>
<li><a href="?p=ordersBasket">$lang[basket]</a></li>
<b>
<a href="YOUR URL PAGE.COM ">Newsletter</a></b></li>
<li><b>

panos

idaryl

Avatar: idaryl

2007-01-19 02:28

Wait a minute... if the js file is using ... [ if( $p == 'Newsletter' ) ]

by placing a direct call to a "url page.com" is defeating the purpose of the script in the index.php page (right?) then, by simply hiding a page (using a script in the core) the same effect would be established.

But, the link in the menu would not be using the "?p=" function? - As I mentioned before, I know how to place a link in the menu to another page -- (its the page itself AND the corresponding link thats a little ambiguos). Did you not see where treewood was going? He was suggesting to setup a page.tpl called "newsletter" and have it load via the ?p= call, somewhat similar to extra sub-pages from the menu itself.

Generating the right ".tpl page" is the key, as well as the link, the correct string I guess is also critical, also as mentioned.

Thanks for the thought, though :-)

Let me know

panos

No avatar

2007-01-19 03:01

idaryl
the 'Newsletter' is a script ?? or one page ??

panos

idaryl

Avatar: idaryl

2007-01-19 08:55

Read the original note that mad posted;

Quick Summary - Mad want s to create a new page for newsletter in a new file called newsletter.tpl, but it doesnt show - Treewood tells him to place the info in a script inside the index.php (if I read that right), but doesnt tell him how to access it - so I ask how. You tell me to place a link to a different (new) page in the menu (why the different way, I dont know). So I explain to you about the first two posts, and you now ask me to explain about the script??

If I knew about this why would I be asking? I think this is getting to be the blind leading the blind.

Forgive me this, but are you only reading the last inserts into this thread?

Let me know

Back to top
about us | contact