kvnirvana Posted December 15, 2011 Share Posted December 15, 2011 I've got this code <{assign var="title" value=$people->getTitle()|cat:" "|cat:$people->getName()|cat:" | Sea.com"}> How do I write some text fx. 'visit' in the beginning of the title value? Tried to do it like this <{assign var="title" value=Visit $people->getTitle()|cat:" "|cat:$people->getName()|cat:" | Sea.com"}> But then I get an error. Any help mych appriciated Quote Link to comment https://forums.phpfreaks.com/topic/253266-title-problem/ Share on other sites More sharing options...
scootstah Posted December 15, 2011 Share Posted December 15, 2011 What is this syntax from? I am assuming some sort of template parser? Quote Link to comment https://forums.phpfreaks.com/topic/253266-title-problem/#findComment-1298278 Share on other sites More sharing options...
kvnirvana Posted December 15, 2011 Author Share Posted December 15, 2011 The syntax is from when the user chooses a person from a drop down they get to the page where that code is from. If the chosen persons title is 'german' and the name is James it would say 'German James | Sea.com' but I want it to say 'Visit German James | Sea.com' Quote Link to comment https://forums.phpfreaks.com/topic/253266-title-problem/#findComment-1298285 Share on other sites More sharing options...
scootstah Posted December 15, 2011 Share Posted December 15, 2011 I get that, but what are you writing it in? That is not standard PHP or HTML. Quote Link to comment https://forums.phpfreaks.com/topic/253266-title-problem/#findComment-1298286 Share on other sites More sharing options...
kvnirvana Posted December 15, 2011 Author Share Posted December 15, 2011 I write it in php and html. I did not write that specific code, somebody told me this was the way to write it, and it seems to work. Quote Link to comment https://forums.phpfreaks.com/topic/253266-title-problem/#findComment-1298288 Share on other sites More sharing options...
scootstah Posted December 15, 2011 Share Posted December 15, 2011 Well that must be part of a template parser. I don't know which one, but by looking at the string I think this might work: <{assign var="title" value="Visit "|cat:$people->getTitle()|cat:" "|cat:$people->getName()|cat:" | Sea.com"}> Quote Link to comment https://forums.phpfreaks.com/topic/253266-title-problem/#findComment-1298292 Share on other sites More sharing options...
kvnirvana Posted December 15, 2011 Author Share Posted December 15, 2011 It works Thank you so much Quote Link to comment https://forums.phpfreaks.com/topic/253266-title-problem/#findComment-1298295 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.