logseq13-full-house-plugin: Any way to render but keep the original block contents?
Looking for a quick way to insert a wiki link using the current page name, first I consider logseq-powerblocks-plugin then cannibalox in forum recommend this.Then I experience this powerful plugin, it deal with the variable such as page name perfectly.
But while I use it in page property block, I realize it renders after clearing the original content of the block. That means it can’t be use in a block that has any content. I think this would cause a big limit to its powerful feature.
So I think is it any way to add the template content but do not clear or replace the original content, just like logseq-powerblocks-plugin?
Discussion: https://discuss.logseq.com/t/any-way-to-get-variables-value-in-custom-commands/15994/1
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (10 by maintainers)
Sure 😎
Technically — absolutely not complex. The main caveats here is product design of the feature. I guess I’ll come to community and users of
Full Houseto get feedback, thoughts, usage cases, problems, etc.They will be very similar to
:commandsfromconfig.edn. But with full house of rendering abilities 😎I’ll check this case later 👌
@stdword Yes. I use it like this.
My template blocks, no need to add properties to parent blocks now:
@stdword Take me some time to test it. It works well now. Seems like while copying a block ref, Logseq will give a hidden block property
id::in file.Take a while to notice that
template::andtemplate-including-parent:: falsebecome useless now, then I deleted all the properties of parent blocks and directly copied the((uuid))of template block(used to be child block) to myconfig.edn. Well done.@stdword hi, again!
I promised to return to this point and now it fixed with the last version of
🏛 Full House Templates: just use copy command from context menu block and block uuid WILL be preserved.Also note a new big feature —
:template-view. With views you can create cool auto-rendering stuff like Daily Journal Templates or Folding page referencesYou’ve faced with known bug, one more time) I definitely stands on importance to be space-independent and user friendly as much as possible. Will fixed it after more important ones. You could watch the issue.
This is true:
:templateis always the template namec.pagecontext variableAs of for now page arg should be specified (with «—» to skip or in full page-ref form) every time you want to send an argument to template. But I don’t like this behaviour too. I will think on ways to get off the ambiguity. Also created an issue so you could subscribe to get updates.
PS and again — thank you so much for a feedback 🙏💜
@stdword WOW sounds great and exciting.
@stdword Cool! Thanks for the work! I already tested it, it works well now, also with macros.
Another question: Is it possible or a good idea to hide it in Logseq template menu? A setting to switch, or use different property name like “
template+” or something like that, to avoid it showing in sys-template menu?Because of the variables, these “enhanced templates" almost won’t be used in sys-template menu. With time passed, a predictable situation is, normal templates will mix up with them and hard to be pick out.
Now it works as you expect: <video width="40%" src="https://user-images.githubusercontent.com/1984175/226592634-e1967483-6a27-43ec-a67b-f64d7a315a8a.mp4"/>
⚠️ I’ll check your exact case with inserting code inside macro later today.
Hello! Thank you for response and feedback! It is really important to me.
Quick response: It is a bug I’m aware of and will be fixed at the very next version.