1770 Posts in 495 Topics by 531 members
Blog Module
SilverStripe Forums » Blog Module » Use TagField with BlogEntry?
Discuss the Blog Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 663 Views |
-
Use TagField with BlogEntry?

4 January 2011 at 10:43am
Is it possible to replace the standard tag field on BlogEntry with the auto-complete TagField?
-
Re: Use TagField with BlogEntry?

14 October 2011 at 7:06pm
bump.
This has to be a common requirement. Are there any resources on this?
Will
-
Re: Use TagField with BlogEntry?

14 October 2011 at 10:28pm
Hi Will,
This is not recommended, but you can replace in BlogEntry the line 81 with:
if(class_exists('TagField')) {
$tagfield = new TagField("Tags", _t("BlogEntry.TS", "Tags (comma sep.)"), null, "BlogEntry");
$tagfield->setSeparator(', ');
$fields->addFieldToTab("Root.Content.Main", $tagfield, "Content");
} else {
$fields->addFieldToTab("Root.Content.Main", new TextField("Tags", _t("BlogEntry.TS", "Tags (comma sep.)")),"Content");
}Hope it helps,
Juan -
Re: Use TagField with BlogEntry?

17 October 2011 at 4:05pm
So this works ?
Can I put this code in mysite ? I don't want to edit the blog code, its a problem when you upgrade.
-
Re: Use TagField with BlogEntry?

3 November 2011 at 6:21pm
@buddhaSource - no not in mysite - in the BlogEntry class instead of the regular field.
I'm not getting good results with it though. seems pretty buggy
w
| 663 Views | ||
|
Page:
1
|
Go to Top |


