[pmwiki-users] pagelist formatting question
Pico
pmwiki at ben-amotz.com
Thu Oct 19 07:54:34 CDT 2006
Paul Lewis wrote:
> Greetings,
>
> Is it possible to configure pagelist to output wiki page titles with
> spaces between the words in the title?
>
> For example, default output is
>
> PenlandIsNamedChairmanOfCountyEducationGroup
> <http://library.usca.edu/digitallibrary/index.php?n=Newspapers.PenlandIsNamedChairmanOfCountyEducationGroup>
>
>
> BranchCollegeCoursesAttractManySCStudents
> <http://library.usca.edu/digitallibrary/index.php?n=Newspapers.BranchCollegeCoursesAttractManySCStudents>
>
>
> LouisPerkinsJoinsStaffAsUSCAAthleticDirector
> <http://library.usca.edu/digitallibrary/index.php?n=Newspapers.LouisPerkinsJoinsStaffAsUSCAAthleticDirector>
>
>
> The preferred output would be
>
> Penland Is Named Chairman Of County Education Group
> <http://library.usca.edu/digitallibrary/index.php?n=Newspapers.PenlandIsNamedChairmanOfCountyEducationGroup>
>
>
> Branch College Courses Attract Many SC Students
> <http://library.usca.edu/digitallibrary/index.php?n=Newspapers.BranchCollegeCoursesAttractManySCStudents>
>
>
> Louis Perkins Joins Staff As USCA Athletic Director
> <http://library.usca.edu/digitallibrary/index.php?n=Newspapers.LouisPerkinsJoinsStaffAsUSCAAthleticDirector>
>
>
> Thanks,
>
> Paul
>
Short answer: $SpaceWikiWords = 1
Longer answer (From PmWiki/Questions):
Q: (October 13, 2006) Ugh.. I really searched a lot, but all I found was
a script for "_" in the cookbook that didn't really work... I'd so much
like to use the pagelist function, but it's so ugly to see all the Names
listed in one big Word. Instead I want to have spaces between the words
like when I first created the page. So that the spaces don't disappear,
you know what I mean. So "This is a Title" gets "ThisisaTitle" now in my
index, but I want it with spaces. I also created the links with spaces
and they work perfectly well.
Marvin
A: What I do is: (1) Add $SpaceWikiWords = 1; to my config.php file and
(2) use the fmt=#title in my pagelists, which formats links as
[[$FullName|+]], where the alias "|+" grabs the page title, if any,
otherwise the page name. Together, these end up giving me what I want.
The other thing you could do is to start giving your pagenames a title
(:title This is the Name of This Page:) and, as above, using fmt=#title.
Q: Great! It works fine, I am happy (did the Spacewikiwords solution).
Thanks a lot for your competent and quick help!
Pico
--
__ /
/ /
/___/ _/ ___/ __ /
/ / / / /
_/ _/ ____/ ____/
>>>===pmwiki at ben-amotz.com===>
More information about the pmwiki-users
mailing list