Page 3 of 4
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Sun May 17, 2009 2:20 am
by WebGirl
Hi viebig,
this looks great - I've just installed News module - and trying to work out how to get Pretty URLs - still trying
Once I've done that, I'll be able to come back here and try to work this out for my client site as well - thanks!
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Thu Jul 30, 2009 7:11 pm
by imeos
Very nice and helpful post.
Cheers

Re: News title on the title of the page for cmsms 1.5.2+
Posted: Wed Sep 02, 2009 7:17 am
by WebGirl
viebig wrote:
Please, comment it, feedback is always appreciated.
And a special cheer to people that read this whole post! (write cheers on the end of your reply so I know that you´re read all that crap)
Regards
Viebig
VIEBIG!!
Thank you thank you! I kept putting this off because it looked too difficult, but it only took a minute or two and I AM SO HAPPY with the results!
I used it on CMSMS 1.6 (yes, I know I have to upgrade

)
Cheers & Hooray to Viebig!
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Sat Oct 24, 2009 4:29 am
by DCX
Thanks for all this info. I got the news title working AOK but have one small tweak that is racking my brain.
The news title code now displays >> Site Name - Page Title
I am trying to switch that to >> Page Title - Site Name
Sounds simple enough but my hack attempts result in errors so far. Existing code looks like this, as described earlier in this post.
Code: Select all
<title>{if isset($pagetitle)}{$pagetitle} - {sitename}{else}{title} - {sitename}{/if}</title>
Can someone help me flip the site and page titles please?
Thank you
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Sat Oct 24, 2009 8:49 am
by Russ
Hi DCX, assuming your are capturing content and assigning variables correctly? (Check out the Smarty manual for capture and assign)
Your code will work, I use something similar.
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Sat Oct 24, 2009 8:29 pm
by DCX
My code does work. I am just trying to display the Page Title first instead of the Site Name first. Trying to flip them around. I keep getting smarty errors. Thanks.
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Sat Oct 24, 2009 8:43 pm
by Jos
maybe the smarty errors come from something else, your code looks fine. What is the error-message exactly?
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Sat Oct 24, 2009 8:53 pm
by DCX
I think I am saying this in a confusing way.
I am using the above and it shows "SiteName - PageTitle" with no trouble. Like this.
Code: Select all
<title>{if isset($pagetitle)}{$pagetitle} - {sitename}{else}{title} - {sitename}{/if}</title>
I am trying to change it to show "PageTitle - SiteName" instead. So I tried this. It does not work.
Code: Select all
<title>{if isset($sitename)}{$sitename} - {pagetitle}{else}{title} - {pagetitle}{/if}</title>
I tried many variations aside from that one. None of them work so far.
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Sat Oct 24, 2009 8:58 pm
by Jos
Code: Select all
<title>{if isset($pagetitle)}{$pagetitle} - {sitename}{else}{title} - {sitename}{/if}</title>
The check on the pagetitle has to stay in ;)
edit: reading back your former posts, there is some mayor inconsistancy in it too ::) :)
edit2: And wath for the $ signs for $pagetitle, I edited the code you most likely want it.
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Sat Oct 24, 2009 9:10 pm
by DCX
Thank you Jos! It works like a charm.
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Sat Oct 24, 2009 9:13 pm
by Jos
And it's exactly the same code you placed yourself in your first post here ;D
You can even write it a little shorter
Code: Select all
<title>{if isset($pagetitle)}{$pagetitle}{else}{title}{/if} - {sitename}</title>
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Fri Oct 30, 2009 12:42 am
by The Wizl
Hi
Just want to say thanks for this wonderful solution. This CMS and it´s "users" and developers rules!!
/Wizl
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Thu Dec 17, 2009 10:43 am
by quantumchris
I wanted to add news titles to the tag and I just got it correctly working thanks to this thread.
Thanks guys!
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Tue Dec 22, 2009 12:31 pm
by viebig
Great! Thank you for reading. Please suggest more "articles", tutorials and howtos, when I have time, I´ll publish them!
Regards
G
Re: News title on the title of the page for cmsms 1.5.2+
Posted: Tue Dec 29, 2009 1:00 am
by Wishbone
nevermind... I thought I was onto something special... but after I re-read the first post, it ended up that I basically did the same thing and I wasn't really as original as I thought.
