h:commandlinks, seo, and prettyfaces

Splash Forums PrettyFaces Users h:commandlinks, seo, and prettyfaces

This topic contains 3 replies, has 3 voices, and was last updated by  domdorn 7 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17782

    broeks
    Participant

    Hello,

    I’ve been playing around with prettyfaces for our website for the last day or two. So far, it has fit the bill nicely for many of the SEO requirements that our business unit is asking of us.

    However, one thing I can’t quite figure out from the documentation, or from my experimentation:

    Is it possible to create an h:commandlink that is seo friendly? All our commandlinks render like this (forum software is stripping things) (angle bracket)a href=”#”

    If I use outputLink, I can specify my new friendly urls as the target in the href easily.

    I could convert all these commandlinks to outputlinks, and use get request parameters, but this is not preferable as we were trying to avoid this — most of the parameters on our links include business logic that we do not want to expose to the user (which is currently being hidden in the post body with the commandlinks).

    Basically, I need to change that lovely # sign to something else, and I want to know if its possible!

    Thanks and have a good weekend!

    Matt

    #20171

    Try using the backtick character to post code (as it mentions below the post box)

    <code/>

    #20172

    I’m not really sure what you are trying to do. If you could post an example (with code ` if you can get it working) that would be great.

    #20173

    domdorn
    Participant

    h:commandLink does the same as a h:commandButton (a form submit), but it works with javascript, so your urls are always “#” to prevent navigating away from the current page.

    if you want seo friendly urls, you’ll have to use the h:link or the prettyfaces equivalent.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Comments are closed.