I am developing my own template and I want to reduce the number of files that are currently in Mollio or Skidoo. In doing this I am also naming .tpl files differently so that they make more sense to me. A simple example, in Mollio the footer is called footer.tpl and you simply include it like this:
{include file="$tpl_footer.tpl"}
However, if I want to change it to somethign like foot.tpl and include it like this:
{include file="$tpl_foot.tpl"}
It does not get included. I can't seem to find where or how template file names are defined, it seems that you can't just make up your own file names and include them. I am kind of worried that it might not be possible to be really creative with templates because you have to stick to the file names already defined. If anyone has any advise on this please let me know.
![]() |
| | LinkBack | Thread Tools | Display Modes |
| ||||
| Last edited by stephencarr; 08-20-2006 at 11:19 AM.. |
| |||
|
I'm not sure, but aren't they difined in the smartyvariables.php in the libs folder? I'm pretty sure thats where the file names are set. Hope that helps.
__________________ DivGamer.com |
| ||||
|
Once you have a template you want to use all you should have to do is upload it into your templates folder. After that you type this URL into your address bar: http://www.yoursite.com/settemplate....e=templatename Make sure to change "yoursite" to your site name and "templatename" to the name of the folder your new template is in.
__________________ I accept donations for my time helping users like you on the forum and IRC. |
| ||||
| Quote:
The more I poke around the more I realise that the templating (display and logic abstraction) is pretty basic in Pligg. You have what you need to do the basics but beyond that you have to hack files that lay outside of the template directory. But having read some of the comments in the code it seems the main Pligg guys are working on this which is promising. |
| |||
| Quote:
__________________ DivGamer.com |
| ||||
|
try this {include file="foot.tpl"} just that no tpl stuff |
| The Following User Says Thank You to savant For This Useful Post: | ||
| |||
|
Maybe i haven't understood correctly one of the original questions, but you define which templates are used in the main files, for example: In index.php, the final line is $main_smarty->display($the_template . '/index.tpl'); This is calling the index.tpl template file when index.php is used. So if you want to rename index.tpl to main.tpl for instance, you'd do so, and then change the corresponding line in index.php. Last edited by Simon; 08-20-2006 at 07:14 PM.. |
| ||||
|
The problem is index.php is a core file and not a template file. When building templates you should not really be touching any of the core logic stuff. Anything outside of /templates should be left alone otherwise when you ask someone to install your template on their system they will have to monkey around with files in the root and /lib. I was hoping to do everything I wanted to do only using .tpl, I thought smarty could do that. At the very least you would have thought you could do includes without having to define them elsewhere, that is just poor. I know I could always write the includes in php within the .tpl file but again, that seems like a hack.
|
| ||||
|
The basic tpl files in pligg sort of create a standardization in the use of templates So as pligg develops further in the future, template designers can simply follow the standard method, and no tinkering around. now if you wanted to use foot.tpl you could simply open up body.tpl and change {include file="$tpl_footer.tpl"} to {include file="foot.tpl"} and you could do this with the whole template. simply hardcode with the filenames you feel fit. and you do not have to define them anywhere else. It should work alright. Another way is to add some php code into the .tpl file. But i don't think you want something that does that. hope this has helped Last edited by savant; 08-21-2006 at 03:42 PM.. |
| The Following User Says Thank You to savant For This Useful Post: | ||
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| LemonTwist Template (Free) by Yankidank | Yankidank | Pligg Templates | 29 | 11-20-2008 01:44 AM |
| MacBlue Free Pligg Template by Yankidank | Yankidank | Pligg Templates | 13 | 11-10-2008 05:37 PM |
| Internal Server Error | cvcxl | Bug Report | 2 | 02-29-2008 06:51 PM |
| Internal Server Error | wagthis | Bug Report | 12 | 01-16-2007 05:20 PM |
| How to make / change a template in Pligg Beta 7 | jimbeam | General Help | 0 | 12-05-2006 01:19 PM |






Linear Mode

