Find in text | |
---|---|
Section | |
Show |
The following table shows all exercises in this book. Click the checkbox to the left to mark an exercise as complete.
Exercise | Section | Length | Text | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Ex:AddContactTemplates | Templates and the Current Tiddler | (s) | Place the (You may be wondering if there's a way to avoid even the repetition of adding the reference to the template to all your tiddlers. The answer is yes, and we'll be getting there in a couple chapters.) |
|||||||||||||
Ex:AllFamilyInformation | Filters and Transclusions | (m) | Edit the
Tip: You'll need to use HTML for the inner bulleted list, as wikitext lists can't be interleaved successfully with As a reminder, to nest lists in HTML, put another |
|||||||||||||
Ex:AlphabeticallyLastDescription | Common Filter Operators | (M) | What is the alphabetically last description that any button on the editor toolbar uses? (The description is what shows up when you hover over the button, minus the indication of the keyboard shortcut. No cheating by hovering over every button!) You'll need some additional information for this one:
And here are two hints if you need them:
This one is intended to be a little bit above your level at the moment – we won't get to some of the concepts involved until chapter 6, Looking Under the Hood – so you might not be able to figure it out. But spend some time working on it before you look at the answer. |
|||||||||||||
Ex:BacklinksConditionalDisplay | Hiding and Showing Things | (m) | Using a |
|||||||||||||
Ex:BasicBacklinksList | Creating a List of Links and Backlinks | (m) | Create a tiddler called |
|||||||||||||
Ex:BasicLinksList | Creating a List of Links and Backlinks | (m) | Edit |
|||||||||||||
Ex:BasicWikitext | Journal Tiddlers | (m) | Edit the journal tiddler again by clicking the pencil icon in its upper-right corner, and add some boilerplate that uses the following types of formatting in the notes editor:
For the lists, block quotes, and code snippets, note that you need to have at least one blank line both above and below them to ensure everything displays correctly. We'll be learning more wikitext syntax as we go through the rest of the book. You can also refer to the Wikitext Reference appendix for a listing of the syntax you're most likely to want. That said, if you don't feel comfortable with what you've seen so far, you might consider doing this exercise a second time; if you feel uncomfortable using wikitext, it will be a major drag on your ability to accomplish more complicated things in TiddlyWiki. |
|||||||||||||
Ex:BulletedMeetingList | Your First Dynamic List | (m) | Modify the Hint 1: Remember that HTML code for creating a bulleted list? Hint 2: The contents of the list widget are rendered once for every tiddler output by the filter. Which parts of the HTML code for creating a list need to be used repeatedly, and which need to be used only once? |
|||||||||||||
Ex:ButtonDisplayTweaks | Creating Tiddlers With Predefined Fields | (M) | Our buttons don't display very nicely:
Correct these issues. You'll want to refer to an existing tiddler on the toolbar to see how each of these things is done. Tip: The fastest way to choose an icon from the set that comes with TiddlyWiki is to open the tag manager and pretend to pick an icon from the drop-down. Each icon shows its full tiddler name, so you can then use that name elsewhere. |
|||||||||||||
Ex:ButtonsOnPageToolbar | Creating Tiddlers With Predefined Fields | (m) | Add these new buttons (created in Ex:NewContactButton and Ex:NewMeetingButton) to the toolbar above the search box in the sidebar. This will require applying a tag to their tiddlers. |
|||||||||||||
Ex:BypassSecurityWithTextSubstitution | Macros | (m) | Suppose that the following macro is being used to validate whether the user is authorized to access something:
Because of the way text substitution works, it's possible to bypass this authentication check without knowing the password (or looking in that tiddler). Figure out what you can fill in between the quotation marks in the macro call to bypass the password check, and check your answer by editing the live example above. |
|||||||||||||
Ex:CamelCaseKnowledgeTiddlers | Reviewing the Basics | (m) | Try changing the title of one of your knowledge tiddlers to not be in CamelCase (add some spaces to it, and/or change the capitalization).
Note: If you rename tiddlers often, the Relink plugin can update the links automatically. |
|||||||||||||
Ex:CanonicalUri | Images and Attachments | (m) | Select a contact you didn't add an image for above. Place an image for this contact in a folder called |
|||||||||||||
Ex:CaptionsByTag | Buttons and Input Widgets | (m) | Create a tiddler called
Note: You'll have to use raw HTML tables to get this to display correctly – wikitext tables don't work if you interrupt them with a
The equivalent wikitext table would be:
|
|||||||||||||
Ex:CarItems | Project Tiddlers | (M) | Suppose you have a tiddler Create the car tiddler in your example wiki and relate several items to it, using each of the four methods discussed in this section. What methods do you like best? |
|||||||||||||
Ex:CircleMathRearrangement | Functions | (s) | In the circle math example, we carefully ordered the functions so that if function B calls function A, function A always comes before function B. What happens if you change the order of the functions so this isn't true? Why do you think this is? |
|||||||||||||
Ex:CircularTransclusion | Field Transclusions | (s) | What happens if you transclude tiddler A into tiddler B, and tiddler B into tiddler A? |
|||||||||||||
Ex:CloseAndReopen | Journal Tiddlers | (s) | Close your new journal tiddler and open it again. |
|||||||||||||
Ex:ConditionalProcedure | Conditional Inclusion | (m) | This code snippet is quite repetitive:
Write a procedure that wraps the logic that's repeated here, and call it four times to produce the same result. Hint: To transclude a field of the current tiddler whose name is in a variable, use the |
|||||||||||||
Ex:ConditionalProcedureContinued | Conditional Inclusion | (m) | The result of Ex:ConditionalProcedure is still repetitive in that it uses the same procedure call four times in a row, with only the field name changing. Can you remove even this repetition, so there is only a single procedure call? Hint 1: What TiddlyWiki feature have we seen that renders some wikitext multiple times? Hint 2: A type of filter expression we haven't discussed explicitly yet consists of a tiddler list (sequence of tiddler names). |
|||||||||||||
Ex:ConditionalSetAt | Hiding and Showing Things | (m) | Repeat the previous exercise, but use a conditional |
|||||||||||||
Ex:ConditionalStyle | Stylesheets | (m) | Modify the tiddler containing |
|||||||||||||
Ex:ConflictingStatements | Parameterizing Field Transclusions | (m) | Suppose you have several co-workers who each have their own opinion about what action to take, and they write a short statement explaining it. Create a Use a procedure inside (You might end up with some text that appears even if you didn't use all of the people/slots. If you want to try hiding it, feel free – we already know some techniques that can do this – but in the next section), we'll learn the easiest way to do this, so it's fine to just wait!) |
|||||||||||||
Ex:ConstructorAfterFilterStep | Anatomy of Filter Steps | (m) | What do you think happens if you run the filter Check your answer by running the filter in TiddlyWiki, after ensuring that |
|||||||||||||
Ex:ContactCard | Miscellaneous Widgets | (m) | Create a tiddler called |
|||||||||||||
Ex:ContactInformationPicture | Images and Attachments | (M) | Edit the ContactInformationTemplate so that it tries to include a picture for each contact. If the tiddler name is, for example, Add an image for one of your contacts and confirm that everything displays as expected for contacts that have a picture and for contacts that do not. |
|||||||||||||
Ex:ContactLinks | Using Variables as Attributes | (m) | Suppose you use a webapp to store your contacts which allows you to access them at Use a dynamic list so new contacts are automatically added. Recall that the current item in a dynamic list is available in the |
|||||||||||||
Ex:ContactList | Your First Dynamic List | (m) | Create a Tip: To create a new tiddler and start it with the contents of an existing tiddler, click the "more" drop-down on the existing tiddler's toolbar and choose Clone. |
|||||||||||||
Ex:ContactListNoPhoneExclusion | Your First Dynamic List | (m) | Modify the |
|||||||||||||
Ex:ContactQuote | Custom Widgets | (m) | Write a The widget should show a link to the person's tiddler, with text matching their name (taken from the Tip: Use the |
|||||||||||||
Ex:ContactRadioButtonQualification | Qualification | (m) | Return to the radio buttons we added to the ContactInformationTemplate in Ex:FamilyRadioButton to display the contact information of a family member of the contact. As written in the answer of that exercise, it is in need of a |
|||||||||||||
Ex:ContactsOnlyOnContacts | The View Template | (m) | Adjust the |
|||||||||||||
Ex:ContactTabs | Tabs | (s) | Create a set of tabs to show all contacts in the wiki. Take a look through the tabs – what isn't displaying right, and what might that mean? |
|||||||||||||
Ex:ContainingCurrentTiddler | Templates and the Current Tiddler | (m) | Suppose that in the
Modify your list widget to achieve this output. The output should continue to be correct if you copy and paste (or transclude) the list widget into a different tiddler – i.e., you cannot simply write |
|||||||||||||
Ex:CountWidgetReplacement | Miscellaneous Widgets | (m) | Go to the |
|||||||||||||
Ex:CreatedNowButton | Working with Dates | (m) | Make a button labeled Created Now that resets the |
|||||||||||||
Ex:CreateMeetingTemplate | Templates and the Current Tiddler | (m) | Our meetings have two fields,
Obviously, your version should include the correct information for whichever tiddler the template is being transcluded into. Don't miss the space before the Transclude this template at the top of all your meeting tiddlers. |
|||||||||||||
Ex:CreateSystemTiddler | System Tiddlers | (s) | Create a new system tiddler, then close it and go locate it again. |
|||||||||||||
Ex:CreatingBasicFilters | Using Filter Expressions | (M) | Write and test filter expressions for the following criteria:
|
|||||||||||||
Ex:CreatingLinkDivs | Creating a List of Links and Backlinks | (s) | Let's do a bit of formatting now. It probably will look better if the excerpt starts on a new line after the title, especially once we get this into two columns. An easy way to do that in HTML is to place the excerpt procedure call in a In addition, let's wrap the Lastly, wrap the whole thing (both the Links and Backlinks sections) in one more div. Aside from the excerpts appearing on separate lines from the tiddler titles, you should not see any difference in output yet – we've merely made it possible to style with CSS. |
|||||||||||||
Ex:CreatingMoreFilters | Common Filter Operators | (m) | Compose and run filters to answer the following questions:
|
|||||||||||||
Ex:CStartTiddlers | Functions | (m) | This snippet is supposed to show a list of all tiddlers in the wiki whose names start with C. Why do you think it doesn't show all the tiddlers? Fix it so it does.
|
|||||||||||||
Ex:CurrentTiddlerAndListWidget | Templates and the Current Tiddler | (m) | In the section on dynamic lists, we used the value of the variable |
|||||||||||||
Ex:DateFormatter | Working with Dates | (M) | Create a tiddler called If the field chosen can't be interpreted as a date, the text Tip: The Here's an example of what it might look like: |
|||||||||||||
Ex:DefaultToField | Filters and Transclusions | (m) | Modify the template you created in Ex:WikipediaLinkTemplate so that if the Tip: The |
|||||||||||||
Ex:DontOverrideViewTemplateTag | The View Template | (m) | In Ex:MoveContactInformation, we edited the In this case, that's not the end of the world, since the tag contains no body text and it's relatively unlikely extra elements will be added to this list in a future version of TiddlyWiki (thus necessitating a manual merge if we want them to show up). However, suppose we want to be purists and avoid overriding a shadow tiddler unless absolutely necessary. How can we achieve the same effect without needing to override Delete the overridden shadow tiddler |
|||||||||||||
Ex:EditCurrentTiddler | Buttons and Input Widgets | (m) | The Look up the documentation for the |
|||||||||||||
Ex:EditTemplateInformation | The View Template | (m) | Add the tiddlers under |
|||||||||||||
Ex:EisLet | Variables | (s) | Change the |
|||||||||||||
Ex:EisVariable | Variables | (s) | In the |
|||||||||||||
Ex:EmptyAtField | Hiding and Showing Things | (m) | Update the |
|||||||||||||
Ex:EmptyProcedureCall | Procedures | (s) | Try calling a procedure that doesn't exist (say, one called |
|||||||||||||
Ex:EqualsPrefixNeeded | Overriding Built-In Widgets | (s) | Why did we need to use the |
|||||||||||||
Ex:ExcerptConfigurationTiddler | Creating a List of Links and Backlinks | (m) | Make the size of the excerpt configurable via a configuration tiddler. Call the configuration tiddler |
|||||||||||||
Ex:ExploreSystemTiddlers | System Tiddlers | (m) | Take a few minutes to poke around in the Explorer section of the More sidebar tab and look into a few system tiddlers to see how they're organized. You can safely edit a system tiddler to look at its wikitext if you like, notwithstanding the scary warning about editing a shadow tiddler; just be sure to click the X button to discard changes when you're done. |
|||||||||||||
Ex:ExtractFunctions | Functions | (m) | Return to the alphabetically last description exercise:
Extract one or more functions from this filter to make it easier to understand. That is, group some of the filter steps by the task they accomplish and create a function with a name that clearly describes what those steps do, and change the filter to call that function instead of using the steps directly. |
|||||||||||||
Ex:FamilyRadioButton | Miscellaneous Widgets | (m) | Add a series of radio buttons on the |
|||||||||||||
Ex:FilteredTelephoneLink | Macros | (m) | Repeat the telephone link exercise, but this time use a filter rather than |
|||||||||||||
Ex:FixingContactTabs | Tabs | (m) | Fix the issue identified in the previous exercise, Ex:ContactTabs, so that all contacts display all information correctly. Hint 1: You'll need to create a template tiddler. You can specify the name of a template used to render each tab using the Hint 2: The If you get really stuck, read the TiddlyWiki documentation on the |
|||||||||||||
Ex:FriendlyViewsNames | Adding to the Sidebar | (m) | By default, all of the tabs will have ugly system-tiddler names on them, like |
|||||||||||||
Ex:FudgeAdviceReflection | Creating Hierarchies with a Table of Contents | (m) | Revisit the tiddler you created in the previous exercise.
|
|||||||||||||
Ex:FudgeAdviceTiddler | Creating Hierarchies with a Table of Contents | (s) | Suppose that, during our meeting, Jane gave us some advice about the company that probably shouldn't stray. We might want to put that in a separate tiddler to reduce the chance we accidentally copy and paste it over to someone else who asks what happened at the meeting. Create such a tiddler with the following text, and make it a child of the
Check the |
|||||||||||||
Ex:FudgeTiddlerRevisited | Creating Evergreen Notes | (s) | If you didn't do it while reading, go back to the fudge tiddler and give it appropriate tags and links. You can link to some nonexistent tiddlers if you like. |
|||||||||||||
Ex:FudgeTransclusion | Field Transclusions | (s) | Our initial motivation for extracting the now-infamous fudge tiddler from the All this is to say, transclude the fudge tiddler into the |
|||||||||||||
Ex:FudgeWithoutJane | Multi-Run Filters | (s) | Write a filter to find all tiddlers mentioning fudge that don't list Jane as a participant. Use two filter runs. |
|||||||||||||
Ex:FunnyClass | Stylesheets | (s) | Add |
|||||||||||||
Ex:FunnyTextCheckbox | Stylesheets | (m) | Add a checkbox to the control panel on a new subtab within the Settings tab called Styles, allowing this value to be toggled on and off, so the user can make text look funny only if they so desire. |
|||||||||||||
Ex:GoogleLink | HTML | (m) | In a new tiddler in your wiki, create a link to Google using HTML, with |
|||||||||||||
Ex:HolidayToday | Data Tiddlers | (m) | Create a tiddler called You may need to look at the documentation for the |
|||||||||||||
Ex:HostingOptions | Supplemental Exercises | (m) | Try out another option for hosting and saving your TiddlyWiki. |
|||||||||||||
Ex:IdentifyingRecentEvergreenNotes | Creating Evergreen Notes | (m) | Find some notes you've recently taken, in any format, and review them to see if there are any ideas that would be well served by being developed as evergreen notes. These might be part of a journal, annotations you made in a book, ideas for a project, or scribbles about a lecture you attended. Write down what contexts these ideas would belong in and what other ideas they would be related to. |
|||||||||||||
Ex:ImageHtml | HTML | (s) | What HTML element is used to insert an image? You may wish to search the web to find the answer. |
|||||||||||||
Ex:ImportScopes | Much More Than You Wanted to Know About Scopes | (s) | Rather than nesting scopes, why not just place the local procedures in a separate tiddler and use the |
|||||||||||||
Ex:InputExistsText | Buttons and Input Widgets | (m) | Add a little bit of text to the right of the Hint: To quickly change the color of some text, you can wrap it with a span, like |
|||||||||||||
Ex:InspectSquare | When Things Go Wrong | (m) | Using your browser's element inspector, determine:
|
|||||||||||||
Ex:JaneDataTransclusion | Field Transclusions | (m) | One of the complaints we had about our Contact Tiddlers when we initially created them was that you couldn't see any of the fields on them without clicking on the info button. Remedy that by adding a section to the |
|||||||||||||
Ex:JaneDoeFamily | Reviewing the Basics | (m) | Visit Jane Doe's tiddler and review the family and manager fields. These fields refer to several people who don't have tiddlers yet. Create those tiddlers, with all the appropriate metadata. You can assume that John Doe and Emily Doe are also managed by Chris Smith (though managing three family members unrelated to you sounds like a disaster waiting to happen). Your choice of phone numbers and email addresses does not matter, provided they are in the correct formats. |
|||||||||||||
Ex:JaneManagerPhone | Field Transclusions | (M) | Transclude a line into the text of Jane's tiddler that contains Chris Smith's phone number, in case she messes up so badly that you need to contact her manager immediately. Can you make it so that it currently refers to Chris's phone number, but if the |
|||||||||||||
Ex:JaneMeetingList | Your First Dynamic List | (m) | Modify the |
|||||||||||||
Ex:JaneMeetingMultirun | Multi-Run Filters | (s) | Write a filter to find all meetings that are part of the |
|||||||||||||
Ex:JohnDoeInAnyField | Common Filter Operators | (m) | In an exercise in the Searching section, we noted that a search for |
|||||||||||||
Ex:JohnDoeSearch | Searching | (m) | Search for |
|||||||||||||
Ex:JsonHoliday | Data Tiddlers | (s) | Create another data tiddler called
|
|||||||||||||
Ex:JumpToTiddler | Buttons and Input Widgets | (m) | Create a tiddler Hint: One of the attributes of the |
|||||||||||||
Ex:LinkDivClasses | Creating a List of Links and Backlinks | (m) | One more step with the divs. In order to get them formatted correctly, we need to be able to identify each of them separately. The way we do this in HTML/CSS is by applying a class (that is, assigning a value to the Again, you won't see any changes in output yet. |
|||||||||||||
Ex:LinkedTiddlerExcerpt | Creating a List of Links and Backlinks | (m) | Add an excerpt for each link – in other words, grab the first 200 characters of each tiddler and show it under the title. This will help us remind us what the tiddler is about, if the title wasn't chosen carefully enough. We can accomplish this by wikifying the tiddler – that is, processing the HTML, transclusions, and wikitext in it as if we were displaying the tiddler – and then taking just the beginning portion of it. Here's a partially completed procedure you can use to get an excerpt from a tiddler. Your task is to figure out what goes in the filtered transclusions (to get the wikitext of the tiddler and convert the rendered wikitext to just its first 200 characters), then call the procedure from an appropriate location.
Hint: The |
|||||||||||||
Ex:LinkingInTransclusions | Field Transclusions | (s) | In general, if we reference ChrisSmith in the Test this hypothesis by looking in the Backlinks tab of |
|||||||||||||
Ex:LinkPattern | Your First Dynamic List | (m) | There's a problem with this pattern that we've been using throughout this section to create a list of links to tiddlers:
The problem is that if the name of the To explicitly create internal links, as we alluded to back in Widgets, we can use the
Add a space to the title of one of your meeting tiddlers, so you can see the problem, then modify the Hint: |
|||||||||||||
Ex:LinkTooltipNonReplace | Overriding Built-In Widgets | (m) | Having overridden the definition of the |
|||||||||||||
Ex:LocalCallFunctions | Functions | (M) | In the local calls exercise, we created template logic to display whether a contact's phone number was local. Write three functions to determine the type of a number, according to the definitions used in that exercise:
Each function should take a phone number (not just an area code) as its parameter, and return that parameter unmodified as its output if the area code is in that class, and yield no output if it is not. Modify the template to use these functions. Tip 1: In the previous answer to the exercise, we did this to check if an area code was in the list of toll-free area codes:
That won't work anymore because the area code will need to be coming in the pipeline as an input tiddler, rather than being in a variable. You can't simply invert them, like
Tip 2: In order to pass the parameter through unmodified without converting it to just the area code, you'll need to do most of the work in a run with the Because the pattern in Hint 1 requires two filter runs, and you can't directly nest multiple filter runs within another filter run, you'll actually need to use a function to combine those two runs, and call that function in the run with the prefixed Here's a complete example, for a function
Will dialing these numbers give you an outside line or an operator (number begins with a 9 or a 0, respectively)?
|
|||||||||||||
Ex:LocalCalls | Conditional Inclusion | (m) | You can add multiple clauses to a single conditional expression using Suppose that you're in the 212 area code, and your office still uses landline phones. Within the You may assume that the area code is the first three characters of the Consider a number to be local if it's in the current area code, and to be toll-free if its area code is Store both the current area code and the list of toll-free area codes in tiddlers, called |
|||||||||||||
Ex:LogWidget | When Things Go Wrong | (s) | If you haven't done so yet, try pasting the example |
|||||||||||||
Ex:LookAtBrowseOptions | Browsing Your Tiddlers | (m) | If you haven't already done so, take a look at each of the tabs discussed above in your sample wiki. |
|||||||||||||
Ex:MailMerge | Supplemental Exercises | (h) | Implement a mail merge in TiddlyWiki. Without writing JavaScript, you cannot actually send emails from TiddlyWiki, but you can produce a list of On the tiddler that implements the merge, you should be able to fill in fields that provide a filter for contact tiddlers you want to send the message to, and some kind of template tiddler that uses a variable or a setting of the current tiddler to substitute in values that change. You'll need to URL-encode the subject and body and put it into the link, which TiddlyWiki has a
…where both Hint: You will need the |
|||||||||||||
Ex:MainSearchBoxBinding | Buttons and Input Widgets | (m) | Figure out what tiddler and field the main search box in the sidebar is bound to. |
|||||||||||||
Ex:MakeGlobalProcedures | Much More Than You Wanted to Know About Scopes | (m) | Find the Remove the original procedure definitions from the individual tiddlers and try calling the procedures from a few different tiddlers to make sure it works. |
|||||||||||||
Ex:ManagerField | Reviewing the Basics | (s) | We chose to use a field to keep track of employees' managers. List at least two other ways we could have chosen to do this, and some advantages and disadvantages of each. |
|||||||||||||
Ex:MeaninglessSuffix | Anatomy of Filter Steps | (m) | What happens if you add a suffix that doesn't have any meaning to a filter operator, such as |
|||||||||||||
Ex:MeetingInformation | The View Template | (s) | Put the |
|||||||||||||
Ex:MeetingListWithoutCurrentTiddler | Templates and the Current Tiddler | (s) | Modify the Hint: Try transcluding a field. |
|||||||||||||
Ex:MeetingOrdering | Ordering Tiddlers | (m) | Create several more meeting tiddlers under the |
|||||||||||||
Ex:MeetingOrderingByProcedure | Ordering Tiddlers | (m) | Repeat the previous exercise using a |
|||||||||||||
Ex:MeetingsToday | Tabs | (M) | Create a tiddler named Don't worry if everything doesn't show up right – we'll talk about why that is and how to fix it in the exercises to follow. You're done with this exercise if you can get the correct set of tabs to appear in the list.
|
|||||||||||||
Ex:MethodsOfTransclusion | Templates and the Current Tiddler | (m) | Create a new tiddler called Tip: If the information about Jane ends up all in one line, try adding some blank lines to your wikitext. |
|||||||||||||
Ex:MoreSidebarTabs | Supplemental Exercises | (M) | Come up with some new sections that would be useful to have on the More sidebar tab and add them in. |
|||||||||||||
Ex:MoveContactInformation | The View Template | (m) | Move the contact information above the rest of the tiddler's body, rather than below it. |
|||||||||||||
Ex:MultipleTransclusion | Field Transclusions | (s) | What happens if you transclude a tiddler that contains transclusions? |
|||||||||||||
Ex:MultiplyByTwoTwoWays | Functions | (m) | We saw two different ways to create a function that multiplies its input by two, depending on whether we wanted to take the multiplicand as an input tiddler or as a parameter:
Create a
|
|||||||||||||
Ex:NamingConventionImagination | Naming Conventions | (m) | Identify a wiki you could imagine yourself creating, then write a set of naming conventions for it. These should include:
You can refer to the naming conventions for my Mosaic Muse notes system for an example. |
|||||||||||||
Ex:NamingOldNotes | Tiddler Titles | (m) | Dig up some old notes you've written for yourself, in any format, and identify:
|
|||||||||||||
Ex:NestedSets | Variables | (s) | Consider the following code:
What do you think happens at each transclusion of |
|||||||||||||
Ex:NewContactButton | Creating Tiddlers With Predefined Fields | (s) | Create a button that creates a new contact. The created tiddler should contain the four fields we've been using, |
|||||||||||||
Ex:NewMeetingButton | Creating Tiddlers With Predefined Fields | (m) | Create a similar button for a new meeting. The |
|||||||||||||
Ex:NewWiki | Supplemental Exercises | (h) | Create and customize a new wiki for some purpose, whether it's useful for you or not. Some ideas that might get you thinking about different ways to organize data:
|
|||||||||||||
Ex:NonexistentTiddlerFilter | Anatomy of Filter Steps | (m) | What do you think happens if you use the Check your answer by running a filter in TiddlyWiki. |
|||||||||||||
Ex:NowTimestampFunction | Working with Dates | (m) | Why did I use a function, rather than a procedure or macro, to define
20241019235626834 Hint: What happens if you try to use the value of the |
|||||||||||||
Ex:OnboardingPeopleFirst | Ordering Tiddlers | (s) | Use the |
|||||||||||||
Ex:PaletteInvestigation | Creating a List of Links and Backlinks | (m) | In the stylesheet I provided, you may have noticed there is a macro call: Find the definition of the |
|||||||||||||
Ex:ParameterizedCit | Parameterizing Field Transclusions | (m) | Clone the If you've been messing with your
|
|||||||||||||
Ex:PreserveSecurityWithTextSubstitution | Macros | (s) | Change the filter in Ex:BypassSecurityWithTextSubstitution so that it is not vulnerable to this kind of manipulation. Continue using a macro – don't convert it to a procedure. (Of course, the user could still just edit the tiddler and remove the authentication altogether. TiddlyWiki is not a suitable environment when users need to have limited access.) |
|||||||||||||
Ex:PrettyWikipediaLink | Procedures | (s) | Update the |
|||||||||||||
Ex:ProblematicTiddlerNames | Naming Conventions | (m) | Explain what is potentially problematic about each of these tiddler names:
None of these are necessarily wrong – although they might be depending on your naming conventions – but they each exhibit a possible danger we discussed above. |
|||||||||||||
Ex:ProcedureAdjacency | Using Variables as Attributes | (s) | What if we don't want to have any text at all except for the URL itself in our Wikipedia link? Try setting a variable |
|||||||||||||
Ex:ProcedurePosition | Procedures | (m) | Try calling the |
|||||||||||||
Ex:QualifyMultipleCalls | Qualification | (s) | What happens if you remove the |
|||||||||||||
Ex:QuotedProcedureCall | The Finer Points of Procedures | (m) | Try calling
What's wrong with the output now? Why do you think this happened? And is there something that's unexpectedly right? |
|||||||||||||
Ex:RaffapKnowledgeTiddler | Reviewing the Basics | (s) | Return to the Employee Information System tiddler and create a new knowledge tiddler for the Really Annoying Five-Factor Authentication Process. Use your imagination on what's involved! |
|||||||||||||
Ex:RaffapReflection | Reviewing the Basics | (m) | Review what you wrote about the RAFFAP.
Update what you wrote accordingly. |
|||||||||||||
Ex:ReadingDefaultGlobals | Much More Than You Wanted to Know About Scopes | (m) | Search for all tiddlers that currently contain globals. Remember that most of these will be stored in shadow tiddlers, so you'll need to say you want to filter on shadow tiddlers to get any results. Also remember to search for both the old tag and the new tag (most items will still have the old tag). Spend a few minutes browsing through some of the tiddlers that come up and looking at some of the system global definitions. You'll recognize some of the procedures/macros from previous chapters, and you should be able to understand a good portion of what's going on. There's no magic – the built-in procedures are simply wrapping up some complicated HTML and widgets for us to use in a convenient way, just like we would do when writing our own procedures. You'll have to edit each shadow tiddler to look at the definitions. Just click the discard-changes button when you're done so you don't mess anything up! |
|||||||||||||
Ex:RecastProceduresAsMacros | Macros | (m) | Go back to several of the procedures you have written for previous exercises and create macro versions that use text substitution, similar to how we created Tip: Try searching for the word |
|||||||||||||
Ex:RedATags | Multi-Run Filters | (m) | Write a filter to find all tiddlers that do not link to a tiddler that has a tag which is both red and begins with the letter C, sorted by title in reverse alphabetical order. Consider a “red” tag to be one with a color code of English is terrible at expressing complicated conditions like this, so to be sure you read it right, here's the sentence decomposed hierarchically and written more precisely:
Tip 1: The Tip 2: The A quick way to test your answer is to add a link from a tiddler that appears in the output to any contact; the tiddler should disappear from the list since it's now linking to a tiddler that has a red tag whose name begins with C. |
|||||||||||||
Ex:RedTagsFilter | Classifying Tags | (m) | Write a filter to find all tiddlers tagged with red tags. Make sure you figure out Ex:TagMetadataStorage first, or you won't have much luck. Hint: Review the Tags section of Common Filter Operators. |
|||||||||||||
Ex:ReversedOptionalParameters | The Finer Points of Procedures | (s) | What do you think will happen if you reverse the order of the parameters in the version of |
|||||||||||||
Ex:RoundtimeMacro | JavaScript Macros | (M) | Create a JavaScript macro called |
|||||||||||||
Ex:RubberDucking | When Things Go Wrong | (m) | Locate a rubber duck or another appropriate object you can explain your TiddlyWiki problems to, and find the problem(s) with the following filter snippet by explaining to your chosen listener what it's doing. Check your answer by fixing the problem. The goal of this filter is to display, in alphabetical order, the summaries of all tiddlers in this chapter, which are stored in their
Filter error: Missing [ in filter expression |
|||||||||||||
Ex:SampleExercise | How to Use This Book | (s) | Search the web to find the name of TiddlyWiki's original developer. |
|||||||||||||
Ex:SaveOptionalParameters | Overriding Built-In Widgets | (m) | The
To prevent such lost parameters, we need to pass all the parameters we aren't explicitly changing through to the original You'll need to know several new things to complete this task: (1) The
(2) To get the base lists of parameter names and values, use the following functions:
(3) When you call the
|
|||||||||||||
Ex:SearchExploration | Searching | (s) | Try searching for a few more tiddlers you've created, both with keywords found in the title and keywords found in the body text. |
|||||||||||||
Ex:SearchingInTransclusions | Field Transclusions | (s) | In an exercise in the previous chapter, we observed that tiddlers referenced in fields did not appear in search. Now, however, in Ex:JaneDataTransclusion, we transcluded the |
|||||||||||||
Ex:SelectiveButtonDisplay | Creating Tiddlers With Predefined Fields | (m) | You may have noticed, as you completed the above exercise, that the list of items that have the page controls tag is quite a lot longer than the buttons that currently appear on the toolbar. Explore your wiki to figure out how the buttons are selectively shown or hidden. |
|||||||||||||
Ex:SelfTransclusion | Field Transclusions | (s) | What happens if you transclude a tiddler into itself? |
|||||||||||||
Ex:SetLetReplacement | Miscellaneous Widgets | (m) | Locate several places in your sample wiki where you have used |
|||||||||||||
Ex:SidebarCurrentTiddler | Adding to the Sidebar | (s) | You might be tempted to use |
|||||||||||||
Ex:Slicing | Slicing Up Content | (M) | Locate some old notes you've taken, or simply consider a topic or problem you've been thinking about recently. What are the important nouns in this topic? How would you divide it into tiddlers, what fields would they have, and how would they relate to each other? You can stub out a few tiddlers in your sample wiki, or simply sketch an outline of the tiddlers on a sheet of paper. |
|||||||||||||
Ex:SlicingInGtw | Slicing Up Content | (m) | Edit a few sections and tiddlers in the Grok TiddlyWiki wiki to get a feel for how it's divided into tiddlers and what fields are present on these tiddlers. Tiddlers are transcluded into other tiddlers using a syntax involving |
|||||||||||||
Ex:SpacedVariable | Variables | (s) | What happens if you put a space in a variable name? |
|||||||||||||
Ex:StretchText | Supplemental Exercises | (h) | StretchText, generally attributed to Ted Nelson, is a form of hypertext in which links, or summary snippets, can be expanded in place: in other words, you can “stretch” parts of the text that you want to see in more detail to zoom in on them. Implement stretch-text in TiddlyWiki using a template or procedure that allows you to expand and contract a tiddler serving as the “next level down”. You can find an example and a TiddlyWiki implementation as the TiddlyStretch plugin in my list of cynical laws. |
|||||||||||||
Ex:StylesheetExperiments | Supplemental Exercises | (M) | If you know a little bit of CSS, read about Stylesheets in TiddlyWiki and make some design changes to your wiki, like changing the text color or the shape of some buttons. |
|||||||||||||
Ex:TagColorGrouping | Supplemental Exercises | (m) | Modify the display of tags in the |
|||||||||||||
Ex:TagColoring | Classifying Tags | (s) | Set the tags corresponding to tiddler types ( |
|||||||||||||
Ex:TagMetadataStorage | Classifying Tags | (s) | How do you think the color and icon of tags are stored? |
|||||||||||||
Ex:TagStyleRule | Stylesheets | (m) | Create a rule in a global stylesheet that makes some class of tiddlers (perhaps a couple of specific titles, or tiddlers with a particular tag) display in a smaller font. |
|||||||||||||
Ex:TelephoneLink | Macros | (m) | Suppose we want to create a link for a contact which, when clicked on a smartphone, calls the contact. This can be accomplished with a link to a URL like Use text substitution in a macro to build the link – do not use backticks or filters. Tip: If you want to use a
That's because |
|||||||||||||
Ex:TelephoneLinkBrokenSolution | Macros | (s) | Why doesn't this solution to the previous exercise work, given that macros perform text substitution?
|
|||||||||||||
Ex:TicketTrackingLink | The Finer Points of Procedures | (m) | Write a procedure called Test this procedure by putting it at the top of the |
|||||||||||||
Ex:TicketTrackingTemplate | Templates and the Current Tiddler | (m) | In the TicketTrackingLink exercise, we created a procedure that outputs a link to a ticket in the company's ticket-tracking system and placed it in the Tip: It may be helpful to get everything working within the |
|||||||||||||
Ex:TiddlersContainingWikiTitle | Filters and Transclusions | (m) | Create a list of all tiddlers that contain the title of the wiki.
|
|||||||||||||
Ex:TocAddition | Creating Hierarchies with a Table of Contents | (s) | Make up and create another meeting under one of the other subcategories, either |
|||||||||||||
Ex:TocCaptions | Creating Hierarchies with a Table of Contents | (s) | Having the word Fortunately for us, the table-of-contents functionality looks for a field called |
|||||||||||||
Ex:TocInternalExternalNav | Creating Hierarchies with a Table of Contents | (m) | There are two more (rarely used) kinds of tables of contents, |
|||||||||||||
Ex:TranscludedProcedureScope | Templates and the Current Tiddler | (m) | In The Finer Points of Procedures, we learned that the scope of a procedure is until the end of the tiddler. But what about when we transclude a tiddler containing a procedure into another tiddler? |
|||||||||||||
Ex:TranscludeWikipediaLink | Parameterizing Field Transclusions | (m) | Create a |
|||||||||||||
Ex:UnclosedProcedureCall | The Finer Points of Procedures | (m) | Take the example The $transclude widget can take variables as parameters and modify it so that the |
|||||||||||||
Ex:UpdatingDisclaimer | Variables | (s) | Suppose that corporate decides it's time to update the disclaimer, and henceforth all documents need to say “doesn't” instead of “does not.” Update the tiddler to make this change. Notice that, with the use of a variable, you need only make the change in one place, even if you included the disclaimer in hundreds of places. |
|||||||||||||
Ex:VariableAfterSet | Variables | (s) | What happens if you refer to a variable after the |
|||||||||||||
Ex:VariableTransclusion | Field Transclusions | (s) | What happens if you set a variable in one tiddler, and transclude a tiddler that references that variable within the scope of the
|
|||||||||||||
Ex:VeryOrdinaryDay | Data Tiddlers | (m) | The Tip: An attribute to the |
|||||||||||||
Ex:ViewsOnSidebar | Adding to the Sidebar | (m) | Place the new Hint: You'll have to figure out how TiddlyWiki picks up tabs on the sidebar. A little bit of detective work right within your wiki should be sufficient; we've seen all the relevant mechanisms by now. |
|||||||||||||
Ex:ViewSource | HTML | (m) | Try right-clicking on the background of this web page and choosing View Page Source. This will show the HTML code behind the page. Scroll through some of it and see if you can find some tags and attributes, like we discussed above. In addition to HTML, you will find some JavaScript (a programming language for web browsers that uses a lot of {curly braces}), some CSS (a language that defines the colors, spacing, and fonts used on the site), some TiddlyWiki wikitext, and probably a few other mysterious things. When you see something you don't understand, just keep scrolling – you're not meant to understand it all, just to get a feel for how a website's HTML looks. For fun, go try this on a couple of other websites, too. |
|||||||||||||
Ex:ViewTemplateExplicitHide | Hiding and Showing Things | (m) | Change the ViewTemplate tiddler that displays the contact information template so that it does not display if the |
|||||||||||||
Ex:ViewTemplateExplicitHideReveal | Hiding and Showing Things | (m) | Repeat the previous exercise, but use a |
|||||||||||||
Ex:WikifiedQuotation | Wikification | (m) | In this snippet, we had to quote the value of
OK: Text: test text Also OK: Text: test text |
|||||||||||||
Ex:WikifyWikipediaLink | Wikification | (s) | Add the following snippet to a new tiddler:
Alter this snippet so the contents of the |
|||||||||||||
Ex:WikipediaLinkSnippet | Stamps | (m) | Create a snippet Link to Wikipedia article that inserts a call to the |
|||||||||||||
Ex:WikipediaLinkTemplate | Filters and Transclusions | (m) | Make the solution of the previous exercise into a separate While you're at it, make this template more robust by getting the value |
|||||||||||||
Ex:WikipediaLinkWithoutProcedure | Filters and Transclusions | (s) | In Ex:ProcedureAdjacency back in Using Variables as Attributes, we found that this attempt to use a simple variable to compose a Wikipedia link didn't work:
Fix this example by replacing the Tip: The filter operator |
|||||||||||||
Ex:WikiStatistics | Filters and Transclusions | (M) | Create a tiddler called
To complete the last one, you'll need to review the list of Mathematics Operators on the filter operators manual page. |