-
Notifications
You must be signed in to change notification settings - Fork 8
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
Version 1.2 #4
Version 1.2 #4
Conversation
Introduces two new features to this extensions: - Anchor Label: Adding an optional custom label for the links on the publish pages - Display URL: Display URL in entries table (Instead of anchor label) See #3
@twiro This is amazing! Thanks! One thing tho: How would you feel about renaming the param to {$system:id} since
? |
ok, that's a valid point ;)
No more since Symphony 2.4 - 'id' as field label or field handle has been disallowed there:
I noticed them and was a little irritated about their supposed functionality - I first thought these would deliver some formatted date-values belonging to the entry, but noticed they were actually used for formatting the current date/time at the moment the function is called. That's actually the reason I thought using the "system"-prefix for the entry ID wasn't the right way to go - it would mix things up that don't really belong together: Other than in the datasource-editor where the "system"-prefix is used for values that are generated by the system but actually do belong to the entry, the current implementation of the "system"-prefix in this extension just takes care of values that don't belong to the entry. Because of that I simply routed for the easiness of {$id} :) But I don't have a problem with {$system:id} if you think that thould be the cleaner option. On another note, I just noticed that theses "system"-variables don't seem to actually work right now. Will send a separate issue for that. |
Did not knew about this thanks! 'system' in that case means "not from a field". Fields holds the "main" data of an entry, the rest is "meta" (wow lots of double quotes). That was use to prevent clash with actual fields name. As for the rest see issue #5.
Please update this one! I did listen and read lots of git talks and I will gladly share my git-fu with you. Since you already started like a good git citizen (you are working on a feature branch) you are facing two valid options (2 and 3 are the same, 2 is just a special type of 3).
In order to amend your commit, you will start by actually changing the source file and make sure it works. Then, when you are ready to commit your changes, issue
If you picked 2 or 3, BEWARE: Never rewrite history on the master/integration branch, only feature/patch branches. Anybody that had previously pulled in your 1.2 branch will get hangry at you because their More on that: https://www.atlassian.com/en/git/tutorial/rewriting-git-history I like to post things like that 😄 but it's late here... please forget the typos and ask questions if I am not clear. |
Sorry markdown let me down on this one. The second 1 should be 3. |
To keep backwards-compatibility I didn't remove the old system-date-formatting. So there are two methods to access system-dates right now: **1) $system:variable** Used for accessing the entry-id and system-dates "the old way" - $system:time - $system:date - $system:year - $system:id - ... **2) $system:variable:qualifier** Used as "the new syntax" to access system-dates. Follows the qualifier-concept used for the field-data and allows using all qualifiers for php date_format - e.g: - $system:date:d - $system:date:Y - $system:date:H:i - ...
Wow. Thank you very much! |
Great. I will test it ASAP and merge if everything went well. Thanks again! |
Don't forget that the Readme still needs to include my latest changes - if you're ok with them. By the way - what do think about renaming this extension to "Frontend Link"? Would reflect the changes in the 1.2-update and somehow communicate more flexibility than focussing on the preview-aspect. "Dynamic Frontend Link" might be a good alternative too, as the dynamic-aspect might be the monst important difference to the "Entry URL"-extension. Well - just an idea... I know one shouldn't rename extensions without good reasons ;) |
Do you want to add them ? :smille: Simply add commit to this PR!
Yeah, I'll think about that, thanks for the suggestion. I think it should only the Dynamic Link since it's not mandatory to be Frontend related. |
@twiro I finally had the chance to review everything and it looks really sharp! Thanks! I you feel to contributing again please pick up any of the remaining tasks:
I will try to do my best to clear those ASAP. Thanks again. |
inluding `:date:` without code-formatting shows a github emoji ;)
Thank you - great to hear it works for you :)
Readme ist updated and reflects the latest changes I made.
Included this change in this PR.
What's wrong with it currently?
Yeah, that would be a nice addition too... do you want to include this in version 1.2 or put this in a later release? I might give this a try these days, but I'm not sure if I'm able to solve this in a clean way ;)
Valid argument... though the readme currently suggests exactly that ;) What about "Dynamic Entry Link" or "Dynamic Link Field" - these would both promote the dynamic aspect without focussing on the frontend and communicate clearly that this extension is entry/field-related. Including an example image in the readme might improve understanding even more: |
I simply do not see it. Maybe it was because I tested it on 2.5rc1 ?
I link it yes! I might have the time to do it this week-end since its a 3 days weekend here in Canada.
Yeah. That's wrong!
I really like this. But let's release 1.2 and then renamed it for 2.0 |
mmh... I tested both with 2.3.6 and 2.5RC1 and the header link is working as expected in both environments - did you do a fresh install or update the extension? I think I did not check the update process with 2.5RC1 - will check that ASAP.
Sounds good 👍 |
Fresh one. |
Does setting an "anchor label" make any difference? I did not touch the javascript that actually generates the link for the header, so I guess this might be caused by an empty But if no anchor-label is found it should simply fall back to the default term "Preview".
Should I change it to:
But I guess that won't fix the problem... any ideas? |
Make the two new inputs fields on two columns. Some code refactoring.
Hey Roman, I finally had the time to try this out... Would you mind testing my |
Everything have been merged into the dev branch... https://github.com/DeuxHuitHuit/link_preview/tree/dev |
Thanks for merging - looks & works great! While testing this in a new project I noticed that I also need IDs of associated entries... so a new PR is already in its way :) |
😄 But for which field do you need it ? |
This Update introduces two new features to this extension:
Behaviour:
Page Publish Entry:
Page Entries Table:
In addition to that I made the entry id available for url formatting and did some small changes & additions in the readme.
It's working fine for me and I tried to adapt as much of your coding-style as possible, but as I'm not an experienced php-coder it might be better if you could review these changes rather carefully ;)