GenericBlock not updating item title in the manager
See original GitHub issueHi,
not sure if its a bug or I am doing it wrong, but using the code below, the title doesnt show up in the item list until a page refresh, It could be onblur setting in vue? According to the docs: “No specific Vue component is needed to render block groups”.
The same thing happens with a region as well, region i have:
using Piranha.Extend;
using Piranha.Extend.Blocks;
using Piranha.Extend.Fields;
[BlockGroupType(Name = "PDFFiles", Category = "Media", Icon = "fas fa-images")]
[BlockItemType(Type = typeof(AuthorBlock))]
public class MyBlockGroup : BlockGroup
{
}
[BlockType(Name = "Author", Category = "Media", Icon = "fas fa-fish")]
public class AuthorBlock : Block
{
public StringField Title { get; set; }
public HtmlField HtmlField { get; set; }
public MediaField PdfFile { get; set; }
public ImageField Image { get; set; }
public override string GetTitle()
{
return Title;
}
}
[Region(ListTitle = "Title", ListExpand = false)]
public IList<MyRegion> PDFFiles { get; set; }
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Sheet Set Title Block Fields not updating...?
Solved: I'm pretty unfamiliar with Sheet Sets and am trying to set up a title block (eventually a template) that will automate the...
Read more >Title Block & Rev Block not updating when processing ...
I have everything set up and drawings/parts can be sent through the workflow, however the title block and rev blocks aren't updating completely....
Read more >Update
See the history of all updates to the Land F/X plugins for AutoCAD, including a description of the new features and fixes added...
Read more >Xcode TabBarItem Title not updating properly
I set the title of the two tab bar items via the attributes inspector and it worked fine on both view controllers.
Read more >class BlockContentBlock - Drupal 10.1
Defines a generic block type. ... Indicates the block label (title) should be displayed to end users. ... Formats a string containing a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mikaellindemann That worked perfectly. So in other words when setting the
ListTitle
property of theBlockTypeAttribute
, overridingBlock.GetTitle()
is not necessary.@mikaellindemann The class
Piranha.Extend.Block
currently has the default implementation:This implementation could be expanded to check if
ListTitle
is set, and if it is return the title for the specified field. IfListTitle
are empty the current string “[Not Implemented]” could be returned. And for all blocks overriding this method it wouldn’t make any difference.