name field in Content instead in Settings tab
#1
Posted 08 October 2011 - 02:46 PM
There was an issue when clients updates the "title" field but forgot to update the "name" field. I think I have saw a way to move the "name" field from Settings to Content tab with a checkbox somewhere in template settings. Now it is gone.
Is it still possible?
Thanks in advance.
P.S.
I agree that it is not goot to change the page urls.
#2
Posted 08 October 2011 - 03:02 PM
You don't want to keep $config->advanced on as it's meant for PW core/system development rather than regular development, and it can get you in trouble (I always keep it off unless I need something in it temporarily). So go back immediately and edit your /site/config.php and set advanced back to false.
#4
Posted 08 October 2011 - 04:27 PM
#5
Posted 10 October 2011 - 12:10 PM
#6
Posted 04 November 2011 - 08:18 AM
Edit your /site/config.php and locate the line that says $config->advanced = false; Change it to true. Now when editing our template, you'll see a "system" tab. Click on that tab and check the box that says to show the name field on the content tab. Save. Your name field should now show on the content tab for pages using that template.
How to do this from API? Need this in one module I am building.
#7
Posted 04 November 2011 - 08:35 AM
How to do this from API? Need this in one module I am building.
$tmpl->nameContentTab = 1;
@somartist | modules created | support me, flattr my work flattr.com
#8
Posted 04 November 2011 - 08:42 AM
What I need to do is to add new fields to settings tab. Is that currently possible?
EDIT: And thanks and [applaud] Soma! You are so helpful that I am beginning to think your help as granted...
#9
Posted 04 November 2011 - 08:59 AM
Not sure what exactly you want to archive... on template settings tab?
I remember a related subject in this thread first page...
http://processwire.c...opic,414.0.html
@somartist | modules created | support me, flattr my work flattr.com
#10
Posted 04 November 2011 - 09:21 AM
#11
Posted 04 November 2011 - 09:57 AM
It returns an InputfieldWrapper that you can append() or prepend() fields, or you can even do something like this:
<?php
$wrapper = $event->return;
$templateField = $wrapper->get('template');
$myField = wire('modules')->get('InputfieldText');
$myField->attr('name', 'hello');
$myField->label = "Hello there";
$wrapper->insertAfter($myField, $templateField);
$event->return = $wrapper;
But I think it's better to just append or prepend to the the wrapper, because you don't really know for sure which fields will be active on the settings tab. Also note that on some pages, there is no settings tab.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













