× Here you can get community support related to Tag Meta.

extracting title from current URL

  • darkhoros
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 4 months ago #1918 by darkhoros
extracting title from current URL was created by darkhoros
Hi,
I have this setting
the ULR is: /keyword-[^/]

the place holder is
p={path}
s={preg_subject 1,${p}}/keyword-(.*)/i{/preg_subject}
a={urlencode}${s}{/urlencode}

and my title is
${a}

what I am trying to do is extracting the part after keyword- from the URL and use it as my page title, i am using the rule settings from my redj as I think both redj and tagmeta work in the same way, and trying to use same rule to do what I need, but the title of my pages is not changing and keep the default title.

Am I doing some thing wrong, or do I miss the whole point of tagmeta?

Thank you for your help and support.
Regards.

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #1920 by admin
Replied by admin on topic extracting title from current URL
No,
you are assuming something wrong. They work the same way, but they do not have the same macros. As example, {urlencode} is just released for you, so is neither available in ReDJ nor Tag Meta. This could be the problem...

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • darkhoros
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 4 months ago #1921 by darkhoros
Replied by darkhoros on topic extracting title from current URL
Thank you for your kind reply.

Ok, I have removed the {urlencode}
so the setting is
the ULR is: /keyword-[^/]

the place holder is
p={path}
s={preg_subject 1,${p}}/keyword-(.*)/i{/preg_subject}

and my title is
${s}

But no luck, I am unable to extract this part of url to use as page title.
Thank you.

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago - 10 years 4 months ago #1922 by admin
Replied by admin on topic extracting title from current URL
Mine was an example. Macro {preg_subject} is not supported yet by Tag Meta.It will be in the next release.

Please, check available macros in the rule edit page.

Kind regards,
Luigi
Last edit: 10 years 4 months ago by admin.

Please Log in or Create an account to join the conversation.

  • darkhoros
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 4 months ago #1923 by darkhoros
Replied by darkhoros on topic extracting title from current URL
Ok,
I will try, but the thing is I am unable to get a match
my url is
www.domain.com/index.php/keyword-TheTextILikeToMatchIsHere

So i am trying in the url field all the following and no luck

/keyword-.*$
/keyword-.*
/keyword-*$
/keyword-*
www.domain.com/index.php/keyword-.*$

and I am putting some test text in the title but unfortunately the title of these page is not changing?

Any Ideas?

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #1925 by admin
Replied by admin on topic extracting title from current URL
You can use just /keyword- and check if the hits counter for the rule raises for each URL request. If not, there's something wrong in the rule.

If hits counter raises, and the page title does not change, I should check the rule in the backend.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

Time to create page: 0.089 seconds