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

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
JeremyBASS

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

Post 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
JeremyBASS

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

Post 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
Last edited by JeremyBASS on Fri Feb 06, 2009 5:07 am, edited 1 time in total.
JeremyBASS

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

Post 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
viebig

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

Post by viebig »

Hi Jeremy.

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

Anyway, didi you try my solution?

Regards
Jean le Chauve

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

Post 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.
JeremyBASS

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

Post 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
viebig

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

Post by viebig »

Solved.

I forgot to add the content capture.

My bad, the main post is fixed!

Cheers
viebig

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

Post 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!
Jean le Chauve

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

Post 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.
Last edited by Jean le Chauve on Sun Feb 08, 2009 1:19 am, edited 1 time in total.
viebig

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

Post by viebig »

great! In think anyone will be able to implement that now!
johnmck
Forum Members
Forum Members
Posts: 34
Joined: Wed May 30, 2007 4:56 pm

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

Post 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.

:)
viebig

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

Post 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.
Jean le Chauve

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

Post 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>
viebig

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

Post by viebig »

great idea!

Regards
Jean le Chauve

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

Post 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  :)
Post Reply

Return to “Tips and Tricks”