kpumuk / meta-tags

Search Engine Optimization (SEO) for Ruby on Rails applications.
MIT License
2.73k stars 275 forks source link

Refactored out the construction of the title tag #12

Closed tmeasday closed 12 years ago

tmeasday commented 12 years ago

Hi,

I needed this for pjax, where you need to do something like:

 <div data-page-container="true" title="<%= full_title %>">

This is because when pjax loads the page via ajax, it changes the contents of the <title> to be what it finds in the title attribute of that tag. So I need access to the full title creating logic mid-way through my view.

kpumuk commented 12 years ago

In this case you would have to duplicate default parameters both in the header, and in the title attribute. I think we should come up with another idea how to implement this.

tmeasday commented 12 years ago

Works great! Thank you very much.

Tom

On 04/03/2012, at 7:39 AM, Dmytro Shteflyuk wrote:

In this case you would have to duplicate default parameters both in the header, and in the title attribute. I think we should come up with another idea how to implement this.


Reply to this email directly or view it on GitHub: https://github.com/kpumuk/meta-tags/pull/12#issuecomment-4304412