|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
cakracepat Smarty n00b
Joined: 03 Nov 2009 Posts: 1
|
Posted: Tue Nov 03, 2009 7:27 pm Post subject: Help me how to repeat the word |
|
|
I have a problem. how to repeat the word. with different places
sample : a've got "WORD1" I want to :
Code: | <a href="/category/WORD1">WORD1</a> |
thanks[/code]
how with smarty to make it |
|
Back to top |
|
jothirajan Smarty Pro
Joined: 06 Feb 2009 Posts: 114 Location: India
|
Posted: Wed Nov 04, 2009 9:34 am Post subject: Happy coding |
|
|
Hi............
Get the code
Code: |
// In your php file just have the following code
/// Have your word in a common file that should be unique to all tpls (common.php ex)
$smarty->assign("ASSIGNED_WORD", "YOUR WORD");
/// in your tpl file just have the following line
<a href="{$ASSIGNED_WORD}">{$ASSIGNED_WORD}</a>
|
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|