News title on the title of the page for cmsms 1.5.2+
Re: News title on the title of the page for cmsms 1.5.2+
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!
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+
Very nice and helpful post.
Cheers
Cheers
Re: News title on the title of the page for cmsms 1.5.2+
VIEBIG!!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
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!
Last edited by WebGirl on Wed Sep 02, 2009 7:19 am, edited 1 time in total.
Re: News title on the title of the page for cmsms 1.5.2+
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.
Can someone help me flip the site and page titles please?
Thank you
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>
Thank you
Last edited by DCX on Sat Oct 24, 2009 8:45 am, edited 1 time in total.
Re: News title on the title of the page for cmsms 1.5.2+
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.
Your code will work, I use something similar.
Re: News title on the title of the page for cmsms 1.5.2+
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+
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+
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.
I am trying to change it to show "PageTitle - SiteName" instead. So I tried this. It does not work.
I tried many variations aside from that one. None of them work so far.
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>
Code: Select all
<title>{if isset($sitename)}{$sitename} - {pagetitle}{else}{title} - {pagetitle}{/if}</title>
Re: News title on the title of the page for cmsms 1.5.2+
Code: Select all
<title>{if isset($pagetitle)}{$pagetitle} - {sitename}{else}{title} - {sitename}{/if}</title>
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.
Last edited by Jos on Sat Oct 24, 2009 9:05 pm, edited 1 time in total.
Re: News title on the title of the page for cmsms 1.5.2+
Thank you Jos! It works like a charm.
Re: News title on the title of the page for cmsms 1.5.2+
And it's exactly the same code you placed yourself in your first post here ;D
You can even write it a little shorter
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+
Hi
Just want to say thanks for this wonderful solution. This CMS and it´s "users" and developers rules!!
/Wizl
Just want to say thanks for this wonderful solution. This CMS and it´s "users" and developers rules!!
/Wizl
-
- New Member
- Posts: 2
- Joined: Thu Dec 17, 2009 10:39 am
Re: News title on the title of the page for cmsms 1.5.2+
I wanted to add news titles to the tag and I just got it correctly working thanks to this thread.
Thanks guys!
Thanks guys!
Re: News title on the title of the page for cmsms 1.5.2+
Great! Thank you for reading. Please suggest more "articles", tutorials and howtos, when I have time, I´ll publish them!
Regards
G
Regards
G
Re: News title on the title of the page for cmsms 1.5.2+
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.
Last edited by Wishbone on Tue Dec 29, 2009 3:30 am, edited 1 time in total.