It is showing full path instead of just text
we need to display link like "Terms and conditions" at registration page instead of www.xyz.com/terms-and conditions

CommentFileSizeAuthor
#2 emtitylega_link.png6.21 KBkaizerking
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

codesidekick’s picture

Status: Active » Needs work

I believe by default the module is designed to display the link as the title of the legal document, linked to the document and not in the format you've posted so it could be a variety of issues from your theme to other contrib modules to a corner case in the entity legal module itself that's causing this.

Because you are posting an issue without a patch we'd greatly appreciate it if you could include a screenshot so that we can see if it's an issue on our end and quickly fix it for you.

kaizerking’s picture

FileSize
6.21 KB

here is the screen shot
the option showing full path is from entity legal
the second one is from legal module for temporarily i am using this.

codesidekick’s picture

Assigned: Unassigned » codesidekick

Thanks for the screenshot, I can see now what the issue is. We can fix this by using a theme function with overridable template or a tokenized field - I think a tokenized field would work better.

The code that's doing it is entity_legal.profile_form.inc line 45 if you want to patch the module for now to meet your requirements before we roll this fix in to release.

I'll try and make some time over the next few days to add the feature to the module complete with tests unless you feel that you want to give it a go and submit a patch. If you feel inclined to beat me to it, feel free to submit a patch in the next day or so.

kaizerking’s picture

Thanks,Waiting for your patch...

  • codesidekick committed 4a4ec82 on 7.x-2.x
    Issue #2490464: It is showing full path instead of just text
    
codesidekick’s picture

Status: Needs work » Fixed

Version 2 will shortly be up on the project page which contains token integration for the acceptance label textfield and does away completely with the description field.

I noticed other sites using this module had rewritten the checkbox's title to accomplish the same thing so it seems to me that putting the link in the description of the checkbox was wrong to begin with and it should have been done with tokens all along.

In the release notes for version 2.0 you'll see how to implement a link to the document using tokens.

Thanks for your help.

kaizerking’s picture

Nice and thanks .But Now we see version number in the link IMHO the version number should not be displayed, This confuses anonymous users. For them the version doesn't matter and is irrelevant.The version number is relevant for those who are already registered users i.e because it is change document for a document which they have already signed. for anonymous users it is the first document.

codesidekick’s picture

I'm not seeing the version number in the url for anonymous users, are you using the [entity_legal_document:url] token? What does your url look like, legal/document/[document_name] or legal/document/[document_name]/[version]?

kaizerking’s picture

It looks like "legal/document/[document_name]/[version] "

codesidekick’s picture

And this is definitely for anonymous, non-administrator users? On my test site I'm only getting legal/document/[document_name]. Could you debug the issue and provide a patch if it's an issue with the module?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.