Webmastersite.net
Register Log In

Just an idea for WSN links users

Title Just an idea for WSN links users
Description Maintaining submit and edit forms
Message Text OK, so I have started using a new way to maintain my submit and edit forms, and the reason I have done this is that I always found it a pain in the neck to have to edit the suggestlink.tpl and the edit.tpl when changing the look of or characteristics of fields. Essentially, the submit form in suggest.tpl and edit.tpl are exactly the same within the table it is held, but for the tags field, and the suggest new categories field. So I thought, why on earth am I editing two templates when I can edit just one and have the changes reflect in both the submit and edit form. So here is what I did... I created a new template called "commonfields" and I added to it the entire table from suggestlink.tpl. I surrounded the suggest new category, and tags table rows with the following... <IF {TID} contains suggestlink>Table row goes here</IF> Once this is done, save the new template as commonfields.tpl. Now strip out the everything in suggestlink.tpl between.. <span class="important">{INCOMPLETE}</span> and <input type="hidden" name="isalbum" value="{ISALBUM}" /> replace with [INSERTFILE=commonfields] Then do the same with the edit.tpl file... Strip out everything between... <span class="important">{INCOMPLETE}</span> and <input type="hidden" name="isalbum" value="{LINKINALBUM}" /> replace with [INSERTFILE=commonfields] Now when you want to make changes to your suggest link and edit forms, you only need to edit one file.. commonfields.tpl It helps me, it may help you. Note that if you want to do this you should only copy the table from suggestlink.tpl to the new template, everything above the table, and below the table must remain the same. Oh and make sure you make a copy of your suggestlink.tpl and edit.tpl files before trying it.
Rating
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5
0/5 based on 0 votes.
Ownership webflair
Views 322 views. Averaging 0 views per day.
Similar Topics
Submission Date Mar 03, 2009 - 9:00 PM