How to rename a field

  • milos
    Support Staff
  • Topic Author
  • Moderator
  • Moderator
More
6 years 1 month ago #47383 by milos
How to rename a field was created by milos
When you want to change a field name, it's enough to change "Label". This is what's displayed on your site. Please don't change "Name" because you'll need to change it in template code as well. In an example, if you change the name of "property-id" you'll need to change it in 4 places in template files:

/templates/sparky_framework/html/com_content/article/default.php
/templates/sparky_framework/html/mod_articles_category/homesrandom.php
/templates/sparky_framework/html/mod_articles_category/homesrecent.php
/templates/sparky_framework/html/mod_articles_popular/homespopular.php

Other fields may have references in different files. You should use a code editor (such as Sublime Text) and search template folder for the old field name (i.e. "property-id") and change it everywhere.

Best regards,
Milos

Please Log in to join the conversation.

Time to create page: 0.214 seconds
Powered by Kunena Forum