Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
I also noticed this, which may be part of the same error, or it could be expected behavior: I thought that toggling messy_to_clean_redirect on would cause URL like these to redirect:
http://{site_url}/index.php?s={section_name}&c={cattegory_name}
—>http://{site_url}/{section_name}/?c={cattegory_name}
http://{site_url}/index.php?s={section_name}
—>http://{site_url}/{section_name}/
Those URLs work, but they are unaffected by any redirects.
Offline
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
johnstephens wrote:
Any idea what I’m doing wrong? I’m fully prepared to be shown an obvious error, but I’d be grateful nonetheless.
John, don’t know if it’s actually related to the issues you are having, but you are using article
tag instead of article_custom
. Article tag is always context sensitive, and will effect the page’s pagination. The section
attribute doesn’t exist.
For example, this works just fine on my end:
<txp:if_article_list>
<txp:article_custom limit="1" section='<txp:if_section name="">home<txp:else /><txp:section /></txp:section>' status="5">
<txp:rah_metas author="Richard Roe" copyright="[...]" messy_to_clean_redirect="1" useauthor="1" />
</txp:article_custom>
<txp:else />
<txp:rah_metas author="Richard Roe" copyright="[...]" messy_to_clean_redirect="1" useauthor="1" />
</txp:if_article_list>
When I’m on the default section page, it will use an article from section home. If I’m on some other section page, it gets the content from an sticky article posted to that particular section, and on individual article page, the metas are build from the currently shown article.
I thought that toggling messy_to_clean_redirect on would cause URL like these to redirect: [..] Those URLs work, but they are unaffected by any redirects.
The redirection feature is just some wasted feature that may not even work on every server. It’s not the optimal solution at all. There are way better ways to do redirection than rah_metas. Best would be to do the redirection on server (Apache) level or at least before TXP’s parser (page template) kicks in.
Last edited by Gocom (2011-04-07 23:51:53)
Offline
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
That worked perfectly, Jukka; thanks!
You’ll note that I did use article_custom for the if_section name=""
conditional, and it still didn’t work. As for the section
attribute of the first article tag, I only added that after seeing your reply to Stef earlier in this thread— it wasn’t working without the section
attribute either. And even if Textpattern ignored it, it still returned the correct title from the <txp:title
tag in the form.
I can’t understand why my code didn’t work, but yours did the trick, and I’m immensely grateful for your help!
Offline
#100 2011-04-08 01:06:39
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
Gocom wrote:
The redirection feature is just some wasted feature that may not even work on every server. It’s not the optimal solution at all. There are way better ways to do redirection than rah_metas. Best would be to do the redirection on server (Apache) level or at least before TXP’s parser (page template) kicks in.
Cool. I’m not too concerned about the redirect features, and I’m happy to use .htaccess for that if needed, I just thought it might be tenuously connected to the other issue.
Offline
#101 2011-08-11 11:57:37
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
Hi Jukka,
Giving this a spin (long past due, I suppose). I just tried easing into it with a very basic use on two different 4.4.1 sites in exactly the same way (on an article page; so in context to a full article), like this:
<txp:rah_metas description_from="excerpt,body" words="50" />
I simply put that in my form that outputs all the metadata, replacing the meta item for description with the above tag. It works on one site just as expected, but not the other. In the latter case, where there should be meta output, it’s just blank in the code source.
If I put a comment around it (I have no idea why I thought it would be useful to try this)…
<!-- <txp:rah_metas description_from="excerpt,body" words="50" /> -->
The comment shows up in the source but, again, not the contained content: <!-- -->
.
Something seems to be blocking it, but I’m not sure what to check.
Ed.…
Just tried using two instances of the tag like this:
<txp:rah_metas description_from="excerpt,body" words="50" />
<txp:rah_metas keywords_from="keywords" />
Again, it works perfectly in the first site, but no output for either tag in the other.
I’ll keep poking.
Ed. 2 …
Another test on each site. If I try…
<meta name="keywords" content="<txp:keywords />">
This works in both sites.
Last edited by Destry (2011-08-11 15:22:06)
Offline
#102 2011-08-11 16:40:43
Offline
#103 2011-08-11 17:31:47
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
Thanks for reminding about tag traces. :)
After doing one, I found there was a mistake in a tag spelling in the template footer. I wouldn’t think that would have anything to do with your plugin, but after fixing it and building the tag like this…
<txp:rah_metas description_from="excerpt,body" words="50" keywords_from="keywords" />
…and it’s now working. :/
Strange, but all seems well.
Offline
#104 2011-08-11 17:42:18
Offline
#105 2011-08-11 20:52:53
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
Love this plugin, it’s used on all my sites. I don’t suppose you have any plans to add additional seo functionality?
For example, it would be nice to be able to set a per-section description and title meta data.
Offline
#106 2011-08-12 07:20:58
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
douglgm wrote:
Love this plugin, it’s used on all my sites. I don’t suppose you have any plans to add additional seo functionality?
Glad you love it. Maybe, haven’t really thought about it.
For example, it would be nice to be able to set a per-section description and title meta data.
You mean like an admin-interface where site authors could easily define descriptions and page titles? Tag way of doing that is already possible, for example by using sticky articles with (or without) rah_metas.
Offline
#107 2011-08-12 20:00:08
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
You mean like an admin-interface where site authors could easily define descriptions and page titles? Tag way of doing that is already possible, for example by using sticky articles with (or without) rah_metas.
That’s what I’m doing now – I’ve got a form with some wonky conditionals to deliver section desctiptions/titles etc.
I’ve also got custom fields to handle specific seo_description (for when the normal except just won’t do in the serps results) and seo_title for when I want the title tag to be different to the article title.
It all gets a bit messy and a admin interface to round this all together would be nice! ;-)
Offline
#108 2011-08-12 22:10:44
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
Maybe adi_variables could be used to create variables for each meta description?
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline