joe,I don't follow the whole story here, but you should only see this twice in the tiddler that is tagged viewtemplate, any other tiddler that has the tag should only show it once.
I want to format tiddlers with a specific tag in a particular way.
I have made...a tiddler called test_formatting with tag $:/tags/ViewTemplateand content... When I do this the text of the tiddler 1 is rendered twice
How can I get the content to be rendered once inside the body of the $list macro?
[data-tags*="erlang_code"] .tc-tiddler-body { display:none; }Cheers/Joe
On Sunday, December 9, 2018 at 2:27:51 AM UTC-8, joearms wrote:I want to format tiddlers with a specific tag in a particular way.I have made...a tiddler called test_formatting with tag $:/tags/ViewTemplateand content... When I do this the text of the tiddler 1 is rendered twiceHow can I get the content to be rendered once inside the body of the $list macro?The problem is that the custom ViewTemplate doesn't *replace* the standard view... it ADDS to it to the end of the standard view. Thus, you see the tiddler content twice: first as standard wikitext output (the normal tiddler display) then followed by your custom-formatted output.
To get the results you want, you need to suppress the standard output... but only when the tiddler is tagged "erlang_code".One quick way to achieve this is to use CSS to hide the standard tiddler "body" element. Just put the following CSS into a tiddler tagged with "$:/tags/Stylesheet":[data-tags*="erlang_code"] .tc-tiddler-body { display:none; }
That should fix your problem. Let me know how it goes.
enjoy,