Simpletagging and news feature [AUTO SOLVED]

General project discussion. NOT for help questions.
Post Reply
fabiano
Forum Members
Forum Members
Posts: 16
Joined: Tue May 29, 2007 12:03 pm

Simpletagging and news feature [AUTO SOLVED]

Post 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
Last edited by fabiano on Thu Mar 03, 2011 6:51 am, edited 1 time in total.
http://www.deltaenergie.it - renewable energy and solar panels
fabiano
Forum Members
Forum Members
Posts: 16
Joined: Tue May 29, 2007 12:03 pm

Re: Simpletagging and news feature [partially solved]

Post 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
fabiano
Forum Members
Forum Members
Posts: 16
Joined: Tue May 29, 2007 12:03 pm

Re: Simpletagging and news feature [AUTO SOLVED]

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

Return to “General Discussion”