[TW5] Stephan's new journal macro - suppress creator

485 views
Skip to first unread message

Jon

unread,
Feb 4, 2014, 1:27:54 AM2/4/14
to tiddl...@googlegroups.com
Hi

I'm using Stephan's new journal macro which is very useful, but I'd like to suppress the creator name at the top of each journal entry.

Thanks
Jon

Stephan Hradek

unread,
Feb 4, 2014, 1:47:56 AM2/4/14
to tiddl...@googlegroups.com
As the creator will always be there, your only chance is to modify the view template to not display the creator.


Jon

unread,
Feb 4, 2014, 2:31:46 AM2/4/14
to tiddl...@googlegroups.com
Thanks, Stephan but how do I do that?

I'm new to this and need pretty clear instructions.

Jon

unread,
Feb 4, 2014, 2:46:32 AM2/4/14
to tiddl...@googlegroups.com

Stephan Hradek

unread,
Feb 4, 2014, 3:08:57 AM2/4/14
to tiddl...@googlegroups.com
Try to find the information here in the groups or on my tw5magick.tiddlyspot.com Sorry that I can<#t link you directly at the moment. When I return from work and no one else could help, I will look into it. It's not too difficult after all.

Jon

unread,
Feb 4, 2014, 3:18:45 AM2/4/14
to tiddl...@googlegroups.com
OK, thanks.

Ton Gerner

unread,
Feb 4, 2014, 5:34:29 AM2/4/14
to tiddl...@googlegroups.com
Hi Jon,

The Viewtemplate comprises 5 shadow tiddlers, the main one $:/core/ui/ViewTemplate adds together all 4 other parts:

$:/core/ui/ViewTemplate/body
$:/core/ui/ViewTemplate/subtitle
$:/core/ui/ViewTemplate/tags
$:/core/ui/ViewTemplate/title

$:/core/ui/ViewTemplate/subtitle contains:

<div class="tw-subtitle"><$link to={{!!modifier}}><$view field="modifier"/></$link> <$view field="modified" format="relativedate"/></div>

The 4 parts are all tagged with $:/tags/ViewTemplate

If you have a look at $:/tags/ViewTemplate you will see there is a list field containing all 4 parts in the default order (space separated):

$:/core/ui/ViewTemplate/title $:/core/ui/ViewTemplate/subtitle $:/core/ui/ViewTemplate/tags $:/core/ui/ViewTemplate/body

If you delete $:/core/ui/ViewTemplate/subtitle from the list, creator and relative date will disappear (you need to save and reload!)

But, I noticed something strange:

My 'old' TW5s show creator and relative date but my 'newer' ones don't display creator and relative date although $:/tags/ViewTemplate has $:/core/ui/ViewTemplate/subtitle in the list!

@Jeremy: any explanation?

Cheers,

Ton

Alberto Molina

unread,
Feb 4, 2014, 5:46:00 AM2/4/14
to tiddl...@googlegroups.com
As the creator will always be there, your only chance is to modify the view template to not display the creator.

Thanks, Stephan but how do I do that?

I'm new to this and need pretty clear instructions.

Hi Jon,

Ton's solution is a good one and a simple one, but as he says "creator AND relative date will disappear" from all your tiddlers. 

If you just want to remove the creator but NOT the relative date, you can try the following:
  1. To remove the creator from ALL tiddlers, but not the relative date:
    • edit "$:/core/ui/ViewTemplate/subtitle" and remove "<$link to={{!!modifier}}><$view field="modifier"/></$link>".
  2. To remove the creator from tiddlers tagged, for instance, "journal", 
    • edit "$:/core/ui/ViewTemplate/subtitle" and replace all its content with this:
    • <div class="tw-subtitle">
      <$list filter="[is[current]tag[journal]]"><$view field="modified" format="relativedate"/></$list>
      <$list filter="[is[current]!tag[journal]]"><$link to={{!!modifier}}><$view field="modifier"/></$link> <$view field="modified" format="relativedate"/></$list>
      </div>
    • the first list says that if the tiddler has the tag "journal" then it shows only the date (modified),
    • the second list says that if there is no tag "journal" then it shows the regular way.

When you update your TW, these changes will be lost. If you don't want that, you can do the following:
  • create a new tiddler called, for instance, "$:/_ViewTemplate/subtitle"
  • copy the content of "$:/core/ui/ViewTemplate/subtitle" with the changes above
  • tag this tiddler with "$:/tags/ViewTemplate"
  • remove the tag "$:/tags/ViewTemplate" from "$:/core/ui/ViewTemplate/subtitle"
  • save and reload

Cheers,
Alberto

Stephan Hradek

unread,
Feb 4, 2014, 6:42:53 AM2/4/14
to tiddl...@googlegroups.com

    • edit "$:/core/ui/ViewTemplate/subtitle" and replace all its content with this:
    • <div class="tw-subtitle">
      <$list filter="[is[current]tag[journal]]"><$view field="modified" format="relativedate"/></$list>
      <$list filter="[is[current]!tag[journal]]"><$link to={{!!modifier}}><$view field="modifier"/></$link> <$view field="modified" format="relativedate"/></$list>
      </div>
Just an idea: Don't you think this is better?

 
  • <div class="tw-subtitle">
    <$list filter="[is[current]!tag[journal]]"><$link to={{!!modifier}}><$view field="modifier"/></$link>
    </$list><$view field="modified" format="relativedate"/>
    </div>

Alberto Molina

unread,
Feb 4, 2014, 11:10:56 AM2/4/14
to tiddl...@googlegroups.com
Just an idea: Don't you think this is better?

 
  • <div class="tw-subtitle">
    <$list filter="[is[current]!tag[journal]]"><$link to={{!!modifier}}><$view field="modifier"/></$link>
    </$list><$view field="modified" format="relativedate"/>
    </div>
Obviously better. It is more elegant and more efficient since it uses only one <$list>.

Indeed, I think the main reason my TW is going slower is because of <$list> abuse in viewtemplates.

Thanks again Stephan!

Jon

unread,
Feb 4, 2014, 12:52:18 PM2/4/14
to tiddl...@googlegroups.com
Many thanks guys for taking the time to explain this and I managed to do it.

Tobias Beer

unread,
Nov 24, 2014, 5:16:27 PM11/24/14
to tiddl...@googlegroups.com
When you update your TW, these changes will be lost. If you don't want that, you can do the following:
  • create a new tiddler called, for instance, "$:/_ViewTemplate/subtitle"
  • copy the content of "$:/core/ui/ViewTemplate/subtitle" with the changes above
  • tag this tiddler with "$:/tags/ViewTemplate"
  • remove the tag "$:/tags/ViewTemplate" from "$:/core/ui/ViewTemplate/subtitle"
  • save and reload
Are core components (still) overwritten upon upgrade?

If not, the procedure now amounts to...
  1. open $:/core/ui/ViewTemplate/subtitle
  2. apply changes above
  3. save
Best wishes, Tobias.

Jeremy Ruston

unread,
Nov 25, 2014, 9:47:04 AM11/25/14
to TiddlyWiki
Hi Tobias

Are core components (still) overwritten upon upgrade?

I'm not sure what you mean. What core components are you talking about?

The issue about upgrading is that if you modify a shadow tiddler and then perform an upgrade that happens to bring in a new value for that shadow tiddler, then your modified version will not include the new value. I think that that situation is the same in TWC.

Best wishes

Jeremy.
 
 

If not, the procedure now amounts to...
  1. open $:/core/ui/ViewTemplate/subtitle
  2. apply changes above
  3. save
Best wishes, Tobias.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Tobias Beer

unread,
Nov 25, 2014, 7:02:23 PM11/25/14
to tiddl...@googlegroups.com, jeremy...@gmail.com
Hi Jeremy,

Nevermind, I perhaps remembered that wrong and it was the updates that didn't get through.
I thought at some point in a distant past customizations could get lost upon upgrade.

Best wishes, Tobias.
Reply all
Reply to author
Forward
0 new messages