Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-12-14 16:38:37
- RsQ
- Member
- Registered: 2006-12-13
- Posts: 10
Accessing manually added custom_field?
Hi all,
I’ve manually added seven additional custom_fields in the SQL-database and everywhere in the source code (custom_11 to custom_17). Works fine now in the back-end – but how can I get access to show it in the front-end?For example, I named custom_9 as “Test1”, custom_10 as “Test2” and (the new) custom_11 as “Test3”. To output “<txp:custom_field name=“Test1” />” and <txp:custom_field name=“Test2” /> is not a problem, but “<txp:custom_field name=“Test3” />” doesn’t work (although it’s shown correctly in the back-end, the database, …).
Who knows what the reason could be? As far as I can see all the database fields and all the source code is correct – maybe there’s a hidden custom field counter that limits the values read for output to 10?!?
Would be happy to have any idea!
Thanks!
Offline
#2 2006-12-14 19:40:54
- RsQ
- Member
- Registered: 2006-12-13
- Posts: 10
Re: Accessing manually added custom_field?
…I fixed it by myself: in publish.php in function getCustomFields() there’s a line “while ($i < 10)” – I changed it to while ($i < 17), now everything works perfect!
So if anyone has the same idea: just search for “custom_1” in all the textpattern files to find the custom field sections. Add the necessary fields in the same structure as the ten already existing have. Then (or before) add the fields to the database (also the field descriptions in the language table). That’s it.
Now I have 17 custom fields!
Offline