Hi Guys, I've tried to have this answered on the smarty.net forum, but nobody replied to that thread so I;m trying here. I have had a lancer write a script for me. He used smarty for it. Everything works fine but i don't know how to ad a link to another page of the site. He tells me that that functionality is not available and if i want it he will charge me for making it. (a module) After digging around i have managed to figure out how to create a page in the system, I can even call it up within another page, but i don't know how to link to it so it displays independently. (It's an about us page and the link would be in the footer). Thanks for any help on this newb q
I'm not familiar with smarty but I imagine if it is template based there is a file called footer.xxx of some sort in the template directory. You could hard code it in this spot. I could not be sure without seeing the system.
Adding a link to another page in your footer would be just like any other site, my web directories use smarty, you have a .php and .tpl for the pages, unless im misunderstanding what you need.
Thanks for the reply guys. Normally it would be but somehow it doesn't work. I'm at another computer right now and don't have access to the files. When I'm back at work I'll post the footer code so you see what i mean.
Could you explain how you did that, did you create a new tpl file or something ? Basically I'm just trying figure out what you need. Your problem is you want domain.com/aboutUs.html is that right ?
Exactly, bang on. I have created both a file called about.php and placed it where all my other php page files are. That file contains the following code <?php $obj['smarty']->assign('file_inc', 'about.tpl'); ?> Code (markup): I then created a file called about.tpl placed it in the templates folder and did my templating in that file. I also included about.tpl in the database alongside the other pages listed in it. Ok so now I would like to link to that file so it displays as domain.com/about.html (or php or anything really). Here is my footer <div id="footer"> <p>{$params.copyr} | <a href="mailto:{$params.email}">{$_lang.Contact_us}</a> | <a href="mailto:bug@domain.com">Report Bugs</a></p> <p><a href="">What is domain.com</a></p> Code (markup): The part i don't know how to do is what to put in here: <p><a href="????????">What is domain.com</a></p> Code (markup): If i just place <a href="http://www.domain.com/about.php"> or any variation thereof (even include path to the file) and i click the link i am not taken to that page but left on my main page. (as if it was a 404 error or something).
It wouldn't be something like <a href="{$smarty.const.DOC_ROOT}/about.php">About</a> would it? im unsure myself, just a thought.
* Pipes * Tried your suggestion and it's still no good. I've spent a week literally trying to figure this out, it's driving me insane. Maybe i need to write a custom function that would do this.