PDA

View Full Version : adding pages


Anonymous
06-21-2005, 12:08 PM
Could someone explain briefly how you would go about adding pages to the scipt? I just want to add a page displaying some images people can use for links, but I want to maintin the bar at the top and its functionality. Is this a simple thing to do?

David
06-21-2005, 02:57 PM
If you take a look at this mod... {older non working link removed}
....it should point you in the right direction. If you look at the link.tpl file, you could just as well add your html where you see {links} now. In this case, you could probably work off of links.tpl and top_hits.php.

Basically, to best conform with the current structure, you need one php page and tpl page. This may seem complicated at first, but it is actually quite easy once you get started.

dreado
06-21-2005, 06:48 PM
Thanks David,
That download doesn’t seem to exist anymore though.
I like the idea of just being able to add some html to a ready made page. If someone has a template of a page that can have html added to it that would be really useful, there must be lots of people who want to add pages but can’t get their head round the php files.

Maybe if I stare at the files long enough I’ll be able to see what’s what :roll:

dreado
06-25-2005, 03:13 PM
Content visible to registered users only.

Thanks dcb, that's a great help, exactly what I needed to know.

Is it possible to also include the breadcrumb trail?

Yury
06-26-2005, 02:06 PM
i do not really understand this..

i creaate a contact.php file with Content visible to registered users only.

then i create the file templates/template.tpl with this code Content visible to registered users only.

and where must i put my content, title, descript, etc.. for the faq site?

dcb
06-26-2005, 04:35 PM
Content visible to registered users only.
is not correct. the code should be:
Content visible to registered users only.

David
06-26-2005, 04:40 PM
There was only one small glitch in your code:
Replace:
Content visible to registered users only.
With:
Content visible to registered users only.
(did not need to specify the folder for the template file)

Some notes:
Content visible to registered users only.
These items appear on the page above the top bar as the title and description.

You would put html between the top bar and the footer like this:
Content visible to registered users only.
Note: sometimes it is good to use strip tags, especially if you are using javascript. It helps to prevent conflicts with Smarty reserved words. It would not have been necessary in this case.

You should be well on your way now to creating your own pages. :D

dcb
06-26-2005, 05:00 PM
Just to clarify:

strip
Anything within {strip}{/strip} tags in Smarty are stripped of the extra spaces or carriage returns at the beginnings and ends of the lines before they are displayed. This way you can keep your templates readable, and not worry about extra white space causing problems.

literal
Literal tags allow a block of data to be taken literally, not being interpreted by the Smarty engine. This is handy for things like javascript sections, where there maybe curly braces and such things that would confuse the template parser. Anything within {literal}{/literal} tags is not interpreted, but displayed as-is.

dcb
06-26-2005, 05:24 PM
For setting the breadcrumb trail use the following code in the php file:
Content visible to registered users only.

Yury
06-26-2005, 06:53 PM
ok..

it work..

but if i will add 10 pages i must create 10 template files + 10 php files with the right name = 20 files :?: :roll:

David
06-26-2005, 07:15 PM
If you want the pages to exist inside the same folder, it would be best to use this method. If you explain a little bit more about what you are trying to do, we might have a better solution for you.

Yury
06-26-2005, 07:46 PM
i would like to integrate my aws script like this page.. http://www.cocktail-rezepte-4u.de/angebote.php

but i think i make it with simple includes :)

because i dont know how to write simple php (contact form f.a.) in this .tpl files :oops:

yktan
06-27-2005, 05:21 AM
Hi Yury, if I understand you correctly, what you're trying to do is to display links with images that might be have multiple pages. In this case, you will only need 1 tpl file because the screen format is the same. The php will have to handle the extraction of data from the database and pagination. Creating new forms and handling data in php requires some knowledge on php so, I would suggest you to read some documentations on php before attempting to do it.

In any case, your idea of the webpages with images is a good one and is already in the Big Wishlist. If it's too complicated for you, maybe you can wait for an official mod/release for it?

Regards,
yktan

dreado
06-27-2005, 07:54 PM
Content visible to registered users only.

Thanks dcb, but it dosent seem to have worked :(

See the 'Link to Us' page http://www.elisted.org/

dreado
06-27-2005, 09:21 PM
Got it working now :)

David
06-27-2005, 10:09 PM
What was it that made it work now?

dreado
06-28-2005, 07:13 PM
Content visible to registered users only.

Thanks to IGonza and David

angeljs
10-12-2005, 09:23 AM
Content visible to registered users only.

Hi, please may I ask how you got this to work? Thank you.[/quote]

dreado
10-12-2005, 09:35 AM
Content visible to registered users only.

See the post above your one

angeljs
10-12-2005, 10:08 AM
Sorry...I didn't see the second page to this post. :oops:

Thank you for your help