0

Is there an easy or at least time saving way to add a title="" to every link we have an auto populate or is this really just a manual update?

Like pagination, buttons, main nav, categories, image links...

I know our custom html (sidebars, footer...) will have to be updated manually. I'm just wondering if there is something I can enable.

1

From what i know there isn't a standard way to do this in Magento.

Best chance at doing this fairly quickly, is to probably use regex. You could use it in your IDE to search for all "a" tags without title attributes.

My regex is not 100%, but this looks like it should work:

<a\s+((class|id|href|)="[^"]+"\s*)+/?>

else you could google some other regular expressions that will do what you need it to do.

You could also use terminal grep|find with similar regex.

If you are any good at jQuery or Prototype, you could write something simple like:

$('a').each(function(){
    .....
});

But ye, regular expressions is your best bet.

FYI: Just tried the regex in PHPStorm and works like a charm.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.