New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug or feature: variables/macros #1760
Comments
I have same problem if macros used in notes of an individual. |
I am not at my desk, but I think I remember that all macros are available with m=SRC, but only partially within notes. I will check. |
I also think I put in the wiki doc a file that will demonstrate all macros if called with m= SRC. See the macros page on tuxfamily. |
Reading the code, I see that the string_with_macros function handles only s and v macros. I would have to dig deeper to see where the %i trick comes from!! |
I have never fully understood how and when most of those macros works and in which context to use it. |
"GeneWeb text present in notes are not pure HTML and may contain variables."
(https://web.archive.org/web/20230926000036/https://geneweb.tuxfamily.org/wiki/macros - https://geneweb.tuxfamily.org down?)
The documentation lists a wide range of variables to be used in "notes" (%t, %f, ...), but most of them seem not to work.
Working:
%s - used in (e.g.): href="%sm=IM;s=my_pic.jpg"
Also working:
%i - resolved to "peter.1.essen" (used in my personnal entry)
not working (cgi-mode!):
href="../%t/video/happy_birthday_pit.mp4
Due to documentation I expected resolving %t to my database name, i.e.: href="../essen/video/happy_birthday_pit.mp4
My workaround:
1.) var_base=essen in essen.gwf
2.) href="../%vbase;/video/happy_birthday_pit.mp4" - works! :)
But what about all that pretty variables listed in the documentation?
Tested in cgi-mode on:
6.08 on win10 (patched, cf. #103)
6.08 on ubuntu-mint
7.01 on raspberrypi
Resolving also tested on 6.08 server-mode on raspberrypi -
Best regards
Pit
The text was updated successfully, but these errors were encountered: