Putting title attributes in page list links
Permalink
For SEO purposes, I need to add a title attribute to all the URLs for pages in a page list. Currently, the URL structure is simply
I need it to read like this:
I tried to accomplish this by making a custom template for the Page List block with a single change in it...from this:
...to this:
...and that worked to put the title attribute in the anchor tag. But it stripped the quotation marks from the href. The link still works all right, but it looks like this:
I'm not a programmer...does anyone here know why this happened? Because it works it may not be too serious; but I just want to have the cleanest source code possible.
<a href="sitename/name-of-category/title-of-article/">Title of Article</a>
I need it to read like this:
<a href="sitename/name-of-category/title-of-article/" title="Title of Article">Title of Article</a>
I tried to accomplish this by making a custom template for the Page List block with a single change in it...from this:
...to this:
...and that worked to put the title attribute in the anchor tag. But it stripped the quotation marks from the href. The link still works all right, but it looks like this:
<a href=sitename/name-of-category/title-of-article/ title="Title of Article">Title of Article</a>
I'm not a programmer...does anyone here know why this happened? Because it works it may not be too serious; but I just want to have the cleanest source code possible.
This is in 5.4.1.1. Same path: concrete/blocks/page_list/view.php.
And I tried that approach anyway, just in case it might work. It didn't...it stripped away the href entirely, giving me this:
...probably just because it's the wrong approach for 5.4.1.1.
<a href="" title="Title of Article" />
...probably just because it's the wrong approach for 5.4.1.1.
Strange, I tried it on a fresh install of 5.4.1.1 , 5.4.2.1 and 5.5.1 and worked just fine.
File: view.php
Line 50 - 53