Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2010-11-02 08:40:32

Gallex
Member
Registered: 2006-10-08
Posts: 1,331

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Gocom wrote:

What doesn’t work corretly? What should it do?

it should output meta description as article title + pildid when in individual article page, but it outputs same description as in section sisekujundus page

What is the full code?

...description_from="body" description_replacement="1" description='<txp:if_section name="default">Kuup Disain tegeleb peamiselt sisekujundustöödega. Oleme teinud ühiskondlikke projekte, lavakujundusi, messibokside väljapanekuid, kaupluste kujundusi ja kodusid.<txp:else /><txp:if_section name="sisekujundus">Siin lehel näed ülevaadet meie seni tehtud töödest.<txp:else /><txp:title /> pildid</txp:if_section></txp:if_section>'...

i think there is a conflict between description_from="body" and <txp:else /><txp:title /> pildid, isn’t it?

Offline

#92 2010-11-19 10:06:26

Gallex
Member
Registered: 2006-10-08
Posts: 1,331

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

thebombsite wrote:

My single minor gripe is that I still use a form for the “robot” meta as I see no point in indexing a listing page, at least not for thebombsite.

Gocom wrote:

<txp:rah_metas robots=’<txp:if_individual_article>index,follow<txp:else />noindex,nofollow</txp:if_individual_article>’ />

but doesn’t this tell to robots to not index the individual articles (which follow to section) as well?
shouldn’t be there ...<txp:else />noindex,follow</txp:if_individual_article> …?

Offline

#93 2010-11-20 13:17:59

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

That’s how I’m using it Gallex, though I also add “archive” and “noarchive” to the tags as well.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#94 2010-11-21 08:31:51

Gallex
Member
Registered: 2006-10-08
Posts: 1,331

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

thebombsite wrote:

That’s how I’m using it Gallex

…and google webmaster tool happy, no duplicated metadescriptions?

did you drop now from robots.txt file as well?

Last edited by Gallex (2010-11-21 08:48:12)

Offline

#95 2011-02-02 19:07:52

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

makss wrote:

Thanks for plugin!

Feature idea:
description_replacement="2" – append description_from to description (description – first, description_from – second)
keywords_replacement="2" – append keywords_from to keywords

Nice idea, although I’d suggest that, if implemented, it prepends (rather than append), so to have the more specific content beginning the meta.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#96 2011-04-07 23:12:43

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Hi, Jukka!

I’m having a strange problem that I haven’t seen anyone else mention, so I’m probably doing something wrong. I am using rah_metas within article_custom/article context to output the specific metadata on the homepage and section landing pages.

Without further ado, here’s the relevant content of my metadata form:

<txp:if_section name="">
	<txp:article_custom form="_metas-dynamic" limit="1" section="home" status="sticky"/>
	<txp:else/>
	<txp:if_article_list>
		<txp:article form="_metas-dynamic" limit="1" section='<txp:section />' status="sticky"/>
		<txp:else/>
		<txp:article form="_metas-dynamic"/>
	</txp:if_article_list>
</txp:if_section>

And here’s the content of the _metas-dynamic form referred to above:

<!-- <txp:title no_widow="0"/> -->
<txp:rah_metas
	author="Richard Roe"
	copyright='Design copyright (c) <txp:php>echo strftime("%Y");</txp:php> by Richard Roe | Content copyright (c) 2000-<txp:php>echo strftime("%Y");</txp:php> by Richard Roe unless otherwise cited'
	messy_to_clean_redirect="1"
	useauthor="1"/>

This works perfectly when viewing an individual article, but it doesn’t seem to work on the homepage or the section landing pages. Here’s what I mean: On an individual article page, I get a meta description excerpted from the excerpt or body field for the designated article.

Having created an article with of status sticky for the “home” section and other sections, I was hoping to get the same results, but rah_metas outputs only the author (as “Richard Roe”, regardless of the article’s author) and copyright info in those contexts, without a meta description— even though excerpt text is provided in the designated articles.

That’s why I added the title comment to the form, so that I could verify that it was loading the correct article for each context. It is:

  • http://{site_url}/ gives me the title of my sticky article in the “home” section (but no description).
  • http://{site_url}/about/ gives me the title of my sticky article in the “about” section (but no description).
  • http://{site_url}/articles/welcome-to-your-site gives me the title of that article AND a meta description. It also shows the context-specific author.

Any idea what I’m doing wrong? I’m fully prepared to be shown an obvious error, but I’d be grateful nonetheless.

Thanks for your support!

Offline

#97 2011-04-07 23:21:20

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

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

#98 2011-04-07 23:48:25

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#99 2011-04-08 01:04:43

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

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

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

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

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

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

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Destry, can you please post high diagnostics and tag trace (from the problem page) from both sites.

Offline

#103 2011-08-11 17:31:47

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

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

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Nice :) Glad you got it sorted.

Offline

#105 2011-08-11 20:52:53

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

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

Board footer

Powered by FluxBB