Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter activecontent

    (@activecontent)

    I see now in the Cloud Gallery i use {+page_url+}?term_slug={+slug+} for the link. Maybe i could add another parameter that represents the ‘pretty’ name of the slug and use for example [+request:pretty+].

    I did this ({+page_url+}?term_slug={+slug+}&pretty={+name+}) and works by using [+request:pretyy+], but when i have att category name like: Cars & Bikes it should be url encoded i think because i can’t read it (just returns ‘Cars’ from the request. Url looks like this:
    ?term_slug=media-dijken-polders&pretty=Dijken & polders

    Is there an encode function in your library?

    Any tips ideas?

    Thanks

    Marcellino

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your question and for finding the “pretty={+name+}” part of the solution. In the “Attachment-specific substitution parameters for the markup template Item part” section of the Settings/Media Library Assistant Documentation tab you will find this solution:

    If you use a substitution parameter in an HTML attribute such as the title attribute of a hyperlink (a) or img tag you can add the “,attr” option to convert special characters such as quotes to their URL-encoded equivalents.

    I believe the “,attr” option will work in this context, although I haven’t specifically tested it. Try coding ({+page_url+}?term_slug={+slug+}&pretty={+name,attr+}) and see if that works for you.

    If it doesn’t work I will investigate further. I will leave this topic unresolved until you have responded.

    Thread Starter activecontent

    (@activecontent)

    David,

    This doesn’t work. Just shows [+name,attr+] as output in the actual URL.

    Solved it for now by removing the ‘&’ sign and replaced it with ‘and’.

    If it is standard text with no things like: & ? é etc etc it can be without encoding.

    Thanks

    Marcellino

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the update; sorry it didn’t work for you.

    I will see if I can fix that for my next release. If you have time and interest, you could try one more experiment. I think you can use a Content Template in this context. Try coding:

    pretty="{+template:({+name,attr+})+}"

    As I said, I’ll look into it further. Thanks for your patience and help.

    Plugin Author David Lingren

    (@dglingren)

    I have given this some additional thought and testing, and I realized that “attr” encoding is not the same as “url” encoding and will not meet your needs.

    I have added a new “,url” option and it is working on my test system for both the [mla_tag_cloud] and [mla_gallery] shortcodes. I will leave this topic unresolved until the next MLA version goes out.

    In the interim you can download the “Development Version”, which contains the new feature. Go to the “Developers” tab above and click on the “Development Version” link to download it. If you would like a copy by e-mail, you can send me your contact information from the Contact Us page at our web site:

    Fair Trade Judaica/Contact Us

    I appreciate your patience and understanding while I thought through and worked on this issue. Please let me know if you try the Development Version and especially if you have any problems with it. I was not able to reproduce your “Just shows [+name,attr+] as output in the actual URL” symptoms on my test system. If you still have that problem can you post the entire source text of your post/page so I can make my tests closer to your application? Thanks again for your help and for your interest in the plugin.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 1.95, which contains the code required to resolve your issue.

    I am marking this topic resolved, but please update it if you have any problems or further questions about using the new “,url” option to get the results you need. Thanks again for the ideas and for your interest in the plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Name instead of Term Slug’ is closed to new replies.