isobar-nz / silverstripe-catalogmanager Goto Github PK
View Code? Open in Web Editor NEWCatalog administration via a LeftAndMain like interface. Lets you create and edit pages outside of the site tree
Catalog administration via a LeftAndMain like interface. Lets you create and edit pages outside of the site tree
Hi,
i installed this addon with composer and added the followiong to /mysite/_config/config.yml:
CatalogPage:
extensions:
- CatalogPageExtension
parentClass: 'CatalogParentPage'
No new Tab is shown after rebuilt and flush ? any idea?
Seems like the publish action is missing?
Clicking on "save" button saves as expected (and also publishes changes automatically)
When editing a page via the modeladmin it doesn't display the standard Content, Settings and History tabs that appear when editing a page within the sitetree.
Is there a setting that can be enabled to display these or is there a template removing these from displaying?
Thanks
in my case i have some "holder" pages for a period, then some "category pages" (which are the ParentPage for the catalogpages) and project pages, which i want to manage using cataolgmanager.
Unfortunately every period has pretty much the same categories.
Now i have the dropdown like
Category 1
Category 1
Category 2
If we can refactor the getter for the Dropdown i could make something like
Period1 > Category 1
Period2 > Category 1
Period2 > Category 2
Hi,
I'm trying to get this module compatible for CMS 5.1 but I experiencing an error when I am entering the backend and viewing the SiteTree.
Can someone help me with that? Or better: can you release a version which is compatible with CMS 5.1
Thanks in advance.
Here is the error-message:
[Emergency] Uncaught ArgumentCountError: Too few arguments to function LittleGiant\CatalogManager\Extensions\CategoryPageHierarchyExtension::augmentAllChildrenIncludingDeleted(), 1 passed in /Volumes/projects/myproject/vendor/silverstripe/framework/src/Core/Extension.php on line 140 and exactly 2 expected
GET /admin/pages/treeview
Line 23 in /Volumes/projects/myproject/vendor/littlegiant/silverstripe-catalogmanager/src/Extensions/CategoryPageHierarchyExtension.php
Source
14 */
15 class CategoryPageHierarchyExtension extends DataExtension
16 {
17 private $excludedSiteTreeClassNames = null;
18
19 /**
20 * @param \SilverStripe\ORM\DataList $stageChildren
21 * @param $context
22 */
23 public function augmentAllChildrenIncludingDeleted(&$stageChildren, &$context)
24 {
25 if ($this->shouldFilter() && $this->owner->hasExtension(HidePageChildrenExtension::class)) {
26 $stageChildren = $stageChildren->exclude('ClassName', $this->getExcludedSiteTreeClassNames());
27 }
28 }
29
Currently blocks that open in a new page navigate to the SiteTree view, and don't navigate back to the catalogue page.
Expected behaviour: Sorting a gridfield item publishes the live and staged version of the dataobject.
Actual behaviour: dataobjects are saved as drafts.
would be great if duplicate button could be switched off in config, either globally or on per DO/PageType basis.
Related to silverstripe/silverstripe-framework#3272
Would it be possible to hide pages from CMS, if they had no parent page set?
Allow the ModelAdmin to sort entries by oterh field when CustomSort is disabled. That way page/records coudl be sorted by Title, Created, or any Field on the DataObject
at least for all pages of a parentPage ;)
Using Translatable module i see the button "Create Translation" but nothing happens...
As the version number rises please provide a changelog with all changes, most importantly the incompatible / breaking ones.
I'd like to know if i can update my project without problems.
And that helpful guy will give you some more modules score ;)
When having the latest sortablegridfield 0.5.x installed i cannot install catalogmanager, cause it wants a 0.4.x of sortablegridfield.
any save chance to get the composer.json modified to allow anything greater 0.4 and below 1.0?
~0.4.0 is just below 0.5 (as we're still requiring a 0.x...)
If i wanted to decide the Parent of my page using some dropdowns (e.g. category, subcategory) and calculate the ParentID onBeforeWrite i need a possibility to disable the ParentID field CatalogPageExtension is providing.
Should be defined in config yml when extending the pagetype. Of course the i have then the full responsibility of creating the right ParentID.
We should translate the buttons and enabled yes/no. I don't know if transifex is needed, though it's quite easy to set up. I can make a PR, maybe after the code cleanup?
Found that I wasn't able to import/export by CSV without having to replace a function, I have made a pull request for this, as I feel this should be default functionality. But I could be wrong.
Thanks
I've added the TranslatableCatalogExtension to my modeladmin, which then shows a language select dropdown in my modeladmin area. When I try to use it to select a language, it throws the following error:
Action 'LangForm' isn't available on class ProductsAdmin.
[User Error] Uncaught Zend_Translate_Exception: Locale "ru" not found in file /home/c/cx40698/grr.tmweb.ru/public_html/betterbuttons/lang/ru.yml
When the parentClass is not set in config, an error is raised
77 throw new Exception('Parent class ' . implode(',', $parentClass) . ' does not exist.');
Ss this a bug or how do i create new pages in the root?
When clicking the delete button in the ModelAdmin gridfield, it doesnt really delete the page, but sets it as draft. Any idea on how to completely delete it?
How about showing ParentPage in ModelAdmin grid when more than one parent exists?
Then you could also filter for it.
I have the following two catalog pages
I'd love to give the client the ability to add/modify Artwork from it's own CatalogPageAdmin or from a Gridfield on Artist. However, when I add CatalogPageGridFieldDetailForm to either a RecordEditor or RelationEditor on Artist it always saves the Artwork to the first Artist and boots me back to teh ArtistAdmin when publishing the Artwork
Hey guys,
Really diggin' this addon.
I've got two things - how do I go about adding GridFieldButtons to my CatalogModelAdmin? My existing buttons that were working before installing the module no longer works.
The other thing - the filter search within the CatalogModelAdmin has been quite buggy and some things don't show up in search.
But the main thing I want to bring up is that some article pages which are controlled within a CatalogModelAdmin cannot be seen in the list, so I tried to access the edit page of an article page manually at "/admin/articleadmin/ArticlePage/EditForm/field/ArticlePage/item/12345/edit". I get a white page of death but with the power of display_errors. I found this error to appear:
"Fatal error: Call to a member function isPublished() on a non-object in /silverstripe-catalogmanager/code/Forms/CatalogPageGridFieldDetailForm.php on line 29".
Updating to current verion broke my app, cause the $parentClass config value is now an array.
Docs haven't been updated, though i'd prefer to rename the config value to $parentClasses (plural) and make a getter which checks if the config value is an array or a string and wraps this in an array.
Maybe first deprecate the old name parentClass and remove in a future release.
Please keep track of braking changes in the readme / changelog.
I can provide a patch for this if you want me to.
would be great if sitetree wasn't cluttered with tons of managed pages (e.g. event calendar etc..)
Lumberjack is doing this by augmenting Hierarchy and overwriting stageChildren() and liveChildren().
We could also try to filter specific page types out using Hierarchies augmentStageChildren
callback - why doesn't liveChildren() has a callback?
When you edit a Page via the CatalogManager the Published button's stage doesn't change when you edit a field. If I edit a page normally in the SiteTree then the Published buttons state does change when I start editing a different field (and then click out of it).
When you are creating a new page via the CatalogManager, I notice that the button says 'Save & Publish' by default.
Tested with a fresh 3.5.1 composer install, then
composer require littlegiant/silverstripe-catalogmanager
I created a TestHolderPage as the parent and TestPage as the child.
TestPage:
extensions:
- CatalogPageExtension
parentClass:
- 'TestHolderPage'
TestHolderPage:
extensions:
- HidePageChildrenExtension
Is my config for this.
I'm looking at removing the DataObject parts of this system completely as we don't tend to use them, and there are other options for this.
Thoughts?
Hi again,
When a catalog page (or a singlepage for that matter) is reloaded in the CMS, some JavaScript (like updating the URLSegement on hitting on the Title field, no longer work.
This is because CMSMain.EditForm.js is only loaded from the CMSPagesController and the CMSSettingsController. So on a straight reload of any of the other menu items it is not available at that point.
Solution in your CatalogPageAdmin:
public function init()
{
parent::init();
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.EditForm.js');
}
Martine
Somehow declaring Enabled in DataExension's static $summary_fields leads to the Enabled column twice. Maybe a bug in Silverstripe?
using instead
public function updateSummaryFields(&$fields){
$fields['getEnabledStatus'] = 'Enabled';
}
solves the problem
BTW: i once provided a possibility to enable / disable a dataobject inside the grid list to https://github.com/Firesphere/silverstripe-newsmodule . are you interested in such a solution for your module?
It seems the yml-examples lack the correct notation of the Extensions.
For example:
extensions:
- CatalogPageExtension
parent_classes:
- CatalogParentPage
should be:
extensions:
- LittleGiant\CatalogManager\Extensions\CatalogPageExtension
parent_classes:
- LittleGiant\CatalogManager\Extensions\CatalogParentPage
Or did I missed something, that it would work without namespaces in the YML?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.