Forum Discussion
Hey Quelyn ,
You sure can.
The TKB template page reads in values from the URL.
http://{CommunityURl}/t5/tkb/articleeditorpage/tkb-id/{TKB ID String}/message-uid/{ID number for message to draft from}/template-id/freeform
That URL will start a new TKB in a specified TKB, feeding off the message ID and using the freeform template.
Just create yourself a custom component using that structure and generate a link direct to the page.
If you want to start from scratch you can drop the message UID completely like this:
http://{CommunityURl}/t5/tkb/articleeditorpage/tkb-id/{TKB ID String}/template-id/freeform
Piece of cake :)
Tim
- Quelyn10 years agoGenius
Tim_h Thanks for this reply, I haven't been able to work on this piece for a bit, sorry for the delay.
I am trying to put this together. I made a new component called "menu-bar@override". Trying to get the original code from the menu-bar component is escaping me though. Is there a way we can see the actual code break down? Copying the HTML from the source on the loaded page isn't the best because it doesn't have any variables anymore.
If I use @delegate, then I can't edit the normal code in there.
I might just be missing something... am I going about this wrong?
- Tim_h10 years agoBoss
Hi Quelyn , I don't think there's a way to get the code of an original component.
Normally you'll need to look at the functionality and create freemarker/api calls to recerate that.
Which menu component are you overriding?
If it's within a forum post you an just write your code to get the message id of the parent post and link to the TKB form from there.
If it's within the TKB drafts section for nominated posts it'll be a little more work to replace the individual rows generated from topics.
The former is much easier to do, it'll just come down to where you insert the component. I've never inserted one into the menu list dropdown sorry. Only added a new button for things :)
Tim- Quelyn10 years agoGeniusI was hoping that I could do one change that would propagate to anywhere that "New Article" exists so that it skips the template choices and goes right to freeform. The new article button is coupled with the menu bar drop down.
Thanks for the guidance, I'll put this on the radar for when I can do more of a deep dive into figuring out the API/etc.
Related Content
- 10 months ago
- 9 years agoInactive User