Page 2 of 4

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Fri Feb 06, 2009 4:13 am
by JeremyBASS
:D I didn't think about other langages... but I see what you mean..

>>>2. You´re really a crazy programmer(in the good sense) to think about that workaround. Really nice!

Lol.. I think mark said I was out in left field too... I hope I'm at least being helpful...

thought... thou this would work for me as I never put special chars in... couldn't you just add a few more |replace:'':''

this may make it cleaner

{assign var=newstitle value=$URLSS|replace:'.html':''|regex_replace:'/(http.*?\/`$content_id`\/)/':''|replace:'-':' '}

I think I can do the replace:'.html':'' in the regex too making it smaller... so you could add the extras... how many special chars are we talking about?

cheers
jeremyBass

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Fri Feb 06, 2009 4:42 am
by JeremyBASS
********************edited***
ok retested... that least one don't work...
so with
{assign var=newstitle value=$URLSS|replace:'.html':''|regex_replace:'/(http.*?\/72\/)/':''|replace:'-':' '}

in
/(http.*?\/72\/)/ that is pretty general... if it's in the url already it should work just fine... but again I never deal with that so I'm not 100% there...  ;D

anyways... cheers
jeremyBass

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Fri Feb 06, 2009 5:15 am
by JeremyBASS
Side note this will work for blogs too... at least in english I guess so far...

proof
http://www.corbensproducts.com/Blogs/42 ... icles.html


still need to change the content_id and the page_extension.... and still need a page to handle details only... but smal price to pay for me...


Cheers
jeremyBass

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Fri Feb 06, 2009 3:20 pm
by viebig
Hi Jeremy.

I´m talking about a lot of chars...

Anyway, didi you try my solution?

Regards

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Fri Feb 06, 2009 5:55 pm
by Jean le Chauve
Cmsms can be proud of two big figures as you  :D.
Viebig, I send you the information of connection by email.

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Fri Feb 06, 2009 10:41 pm
by JeremyBASS
hey viebig,

No that I did not.. but to be honest... I try to never do a file mod, unless I have to... thou I see why other languages would need to in this case, since I almost always only make a site in English, I don't think I’ll have to worry about it till the pretty url issue you talked about gets fix... if I get a chance I'll try in my sandbox...

@Jean le Chauve
>>>Cmsms can be proud of two big figures as you
that is kind, thou I'm sure I haven't made that big of an impact...  :D

cheers all

jeremyBass

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Sat Feb 07, 2009 11:28 pm
by viebig
Solved.

I forgot to add the content capture.

My bad, the main post is fixed!

Cheers

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Sat Feb 07, 2009 11:38 pm
by viebig
@JeremyBASS

Let's keep improving cmsms with our creative ideas!

@Jean

I sent you a mail and configured your template correctly, Let me know if are any questions left.

@All
I corrected the main post, everything is fine now! Please let some feedback on how usefull this mini tutorial was, so I can aim to write another.

Cheers!

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Sun Feb 08, 2009 1:12 am
by Jean le Chauve
Great Viebig, all work right now.

I made simplification of your work :
1. I let process_whole_template enabled in config.php
2. I put {process_pagedata} just after the doctype (so the use of "Smarty data or logic that is specific to this page:" still working and the page is not into quirks mode)
3. I put {if $page_name=='news'}{content assign="capturedcontent"}{/if} /*news is the page for displaying the news
4. I put {if $page_name=='news'}{$capturedcontent}{else}{content}{/if}

Let me know if this work for you.

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Tue Apr 28, 2009 7:34 pm
by viebig
great! In think anyone will be able to implement that now!

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Tue May 05, 2009 11:09 am
by johnmck
Hi Guys,
I want to make CMSMS fool proof for my end users.

What I'm looking for is a solution that will do the following:

1. Use the extra page attribute fields for the meta description and meta keywords
2. If they are not completed then revert back to the global meta
3. remove the Page Specific Metadata, Smarty data or logic that is specific to this page, tab index and access key fields from the options area.

:)

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Tue May 05, 2009 3:26 pm
by viebig
if you use my solution(creating content block on templates), your users would never access the options tab, else you'll need to change the core source code, and many system upgrades will need the same adjustments.

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Thu May 07, 2009 8:52 pm
by Jean le Chauve
With canonical integrated :

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{process_pagedata}
{if $page_name=='news'}
{* news = name of the page assignated to the details *}
{content assign="capturedcontent"}{/if}
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr_FR">
<head>
<title>{if isset($pagetitle)}{$pagetitle} - {sitename}{else}{title} - {sitename}{/if}</title>
{if isset($canonical) AND $page_name!='news'}<link rel="canonical" href="{$canonical}" />{elseif isset($content_obj) AND $page_name!='news'}<link rel="canonical" href="{$content_obj->GetURL()}" />{/if}
{/if}
{metadata}
{stylesheet}
    </head>

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Fri May 08, 2009 6:24 am
by viebig
great idea!

Regards

Re: News title on the title of the page for cmsms 1.5.2+

Posted: Fri May 08, 2009 12:55 pm
by Jean le Chauve
For the continuation of your post SEO in portuguese:
Into the news template, you can use the field extra for the description
{assign var='description' value=$entry->extra}
and {if !empty($description)}{/if} into the head of the page's template

You had a great idea Viebig, thank you  :)