Page 1 of 1

Simpletagging and news feature [AUTO SOLVED]

Posted: Wed Mar 02, 2011 11:02 am
by fabiano
Hi everybody,
I tried all the old posts about but without finding the right solution. I had this template working fine before the update where I was capturing the tag with the UDT as I've seen in a old post.

Code: Select all

get_tag
$tagname=$_GET['ctag'];
echo $_GET['ctag'];
and the the template I used this code:

Code: Select all

<head>
{process_pagedata}
{capture assign='tagname'}{get}{/capture}

{if !empty($tagname)}
    <title>Tag {$tagname} - {sitename}</title
{else}
{capture assign='news'}{get_news}{/capture}

{if $news}
     {assign var=tagname value='Notizie Energetiche'}
    <title>bla bla bla </title>
{else}
    <title>{title} - {sitename}</title>
   {metadata}
   {capture assign='tagname'}{title}{/capture}
{/if}
{/if}

but after the upgrade it doesn't work anymore. I think is the UDT that doesn't work. Can some help me find a solution?
I tried to set the process_whole page to false as I red but is not working anymore at all.
suggestions?

thanks a ton

Re: Simpletagging and news feature [partially solved]

Posted: Wed Mar 02, 2011 5:08 pm
by fabiano
partially solved for the simple tagging cuz I've replaced the 'get' UTD with this code using the URL to get title:

Code: Select all

if (substr($_GET["page"],0,4)== "tags"){
echo substr(strrchr($_GET["page"], '/'),1);
}
now I'm going back to think something for the news.... I'll let you know

Re: Simpletagging and news feature [AUTO SOLVED]

Posted: Thu Mar 03, 2011 6:58 am
by fabiano
I follow the tip of JeremyBass and I create a UDT in this way:

Code: Select all

if (substr($_GET["page"],0,4)== "news"){
echo str_replace ( '-' , '  ' , substr(strrchr($_GET["page"], '/'),1));
}

after that I checked if in the title there is the news tag or not and I assign it in a variable and show in the title. and in the template...

Code: Select all

{capture assign='news'}{get_news}{/capture}

{if !empty($news)}
that's it. I know that special char cannot be displayed but is better than nothing. Unfortunately with the modrewrite and the new version of CMSMS I had to change the code.
Hi guys.. nice to post here! hope is useful to someone..