Cookbook /
EditTitle-Talk
Summary: Talk page for EditTitle.
Maintainer: Waylan
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.
Comments
- Is it possible to make the same thing with "
(:keywords :)
" markup? (Sergey P., 11 Oct, 2005)
I image that would be no big deal. Although I think we need to define a global variable (as I listed under" Possible Improvements") to call in the markup. What markup would you propose? Perhaps (:title:) with no spaces? Although that could confuse some. Maybe
(:pagetitle:)
? In any event, I added your suggestion to the list. (Waylan, 11 Oct, 2005)
On further investigation, adding some sort of "
(:keywords :)
" markup is not necessary as something similar already exists; namely PageVariables. Basically, any of the variables that can be called in the templates can also be called in markup like so: {$VariableName}. So to display the title within the markup just use {$Titlespaced}. I should note that as PmWiki already offers an easy to use solution, I will not be developing one myself. Additionally, such markup should not be dependent on the EditTitle recipe and the EditTitle recipe should not be dependent on said markup being present. Of course, if anyone wants to add the markup to their own config, they certainly can. (Waylan, 18 Oct, 2005)
- How about adding a single field for comma separated Categories which are then stored as [[!cat1]],[[!cat2]],.... (DaveG, 4-Dec-05 02:16.)
- When used with PmWiki 2.2.0.16, the title isn't saved with the rest of the input data. I'm trying to figure this out and so far, cannot work around the problem. Does somebody face the same problem? (ThuanH, Dec. 27, 2006)
- Is it possible to populate the field with a default title when creating a new page? Caroline Guénette March 9, 2012
- With this recipe, page cannot be deleted. When it is to be deleted, title is written back and page remains accessible. (Roman 2005-10-25)
- How are you deleting the page? Try removing all the content and the title from the input field, then save. Although, I suppose if you're using ForceTitle, that is a problem. I'll see about adding a check for this. (Waylan October 27, 2005, at 10:05 AM)
- Fixed in v 0.8. Thanks Roman.
- How to Delete a Page: Just follow the same procedure as before. Make sure to remove the text from the Title input field (it should be blank), replace all the text in the textarea with the text "delete" and save. The page should now be 'deleted' per PmWiki's default behavior. (Waylan October 27, 2005, at 10:56 AM)
- When combined with editTemplates new page does not get title specified in page template. (Roman 2005-10-25)
- I believe this is because the EditTitle script is running before PmWiki looks at the
$EditTemplatesFmt
variable. I'll have to take another look at the code and see it I can't work around this. Although, I don't really see the value as every new page would then have the same title which seems kind of silly to me. Unless the title was something like "Add title here". Even then, its a trivial matter IMO. When I have the time, I'll see what I can do. (Waylan October 27, 2005, at 10:04 AM)- It looks silly but it can happen easily. You can have several groups (in my case each group for each software module) where all groups should have some pages with the same structure (I created edit templates for them). So each page created from template has the same name because they are in different groups. Roman 2005-10-28
- Fixed in v 0.9. Thanks Roman.
- Actually, the
EditTemplate()
function (which uses$EditTemplatesFmt
) was (and still is) being called before myRemoveTitle()
function. I was very particular about the order in which all the$EditFunctions
where called to avoid breaking anything. Unfortunately, theEditTemplate()
function is not aware of the title variable ($new['title']
- which this recipe adds), so it wasn't copying it over with the main text ($new['text']
). The good news is that the title markup is still in the main text at this point, so I just added a catch to pull the title from the markup rather than$new['title']
if its blank. Although I had to add a second regex call (which I initially worked so hard to eliminate), it's only being called when creating a new page from an edit template (or any other situation where the core may not be aware of$new['title']
). I can live with that. However, I wonder if theEditTemplate()
function should be rewritten to be aware of other possible variables such as$new['title']
. Patrick, what are your thoughts?
- I believe this is because the EditTitle script is running before PmWiki looks at the