Umbraco IContentFinder Virtual Node - umbraco

I'm trying to load a node under a diffrent parent through the IContentFinder. I can locate the correct node by useing some kind of wildcard system.
So an example:
www.example.com/group1/overview/id
www.example.com/globalOverview/id
The node from group1 can be shown with the correct URL in the global overview. The downside is that the parent is the group overview instead of the globalOverview. This will screw up the breadcrumb and other parent related things.
Is there any way to change the node it's parent for only that request. Or assign a virutal Path/Parent. If there are other posibilities shoot!
Cheers, Tom
Umbraco Forum post
Umbraco 7.2.x

Related

Umbraco routing not working outside Home node

To reproduce the issue create the following hierarchy:
Content
Home
Foo
Bar - The published URL will be <domain>/foo/bar
Foo
Bar - The published URLwill be <domain>/bar
Why does umbraco skip /foo/ when creating a page outside of Home? Is there a way to make nodes outside of Home stack the path as the nodes under Home?
Umbraco v7
Home is your root node so / will show your home page and /foo/ will show the home>foo page.
The only way to show nodes under the root foo node is to provide a hostname on the root foo node using 'culture and hostnames'
Obviously once you do that, you will also have to set that hostname up as a binding on the same website in iis as well.
It would probably also be good practice to set a hostname for the home node as well if you add one for the foo node
I've managed to understand what's going on with the help from Umbraco community.
By default umbraco treats each child of Content as a root node aka home page. This is controlled by the following setting in web.config <add key="Umbraco.Core.HideTopLevelNodeFromPath" value="true" />
If I would extend my example by adding 3rd level like so: Content > Foo > Bar > Baz I would see that the published path of Baz is /bar/baz. Umbraco does stack the path but it removes the 1st level because it's considered the default route.

Architecture of CMS on Top Symfony CMF

Im building a very custom CMS on top of Symfony CMF Components/Bundles. I read almost everything i could about the CMF Components/Bundles and i have the "architecture" kinda defined. Im experienced/familiarized with Symfony2 components.
The CMS should provide a way to manage multiple sites.
A Site contains Pages.
A Page, requires a title and may have content. A page can also have blocks associated(Those already provided by the Block Bundle, and others with custom functionality developed by me for the CMS).
For now i defined two Documents(Site and Page).
Based on the application requirements im using the CoreBundle, BlockBundle, RoutingBundle, DoctrinePHPCRBundle, and DoctrinePHPCRAdminBundle.
Based on this requirements the expected Repository Tree should be something like:
/sites
/site1 ( nodename of the Site Document )
/pages ( all pages of this site )
/page1 ( nodename of a Page Document )
/page2
/routes ( all routes of this site )
/site2
/pages
...
The configurations for CoreBundle:
cmf_core:
persistence:
phpcr:
basepath: /sites
enabled: true
Because i need nodes(/pages, /routes) for each site, how can i initialize them? My first idea was onPostPersist event of a Site document i initialize the required nodes.
use PHPCR\Util\NodeHelper;
...
public function initSiteNodes(ManagerRegistry $registry, Site $site)
{
$session = $registry->getConnection();
NodeHelper::createPath($session, $site->getId()./pages);
NodeHelper::createPath($session, $site->getId()./routes);
$session->save();
}
So my questions are:
Is this architecture feasible and is SonataAdminBundle prepared for such a structure?
Great to hear you are building a custom CMS on top of the CMF. This is one of the main intended use cases for it.
For your usecase, one important thing to note is that the route base paths can be an array of paths. If you know the sites that will exist, you can simply configure base paths for all of them.
If they can be dynamically created, you will need some more work. You could check if the expression language can help you, or write a symfony request listener that comes very early and sets the right base path on the cmf_routing.phpcr_candidates_prefix service.
The sonata phpcr-odm admin was not really optimized for multisite use cases. However, with the help of the permission system, you should be able to control who may see what.
You could also write to the symfony-cmf-users mailing list. A couple of people did multisite projects with the CMF and might have additional ideas or inputs. And feel free to open pull requests or issues on the corresponding CMF repositories if you see things that could be improved.

(JIRA) Copy "component watcher" entries into list of "Watchers"

I want to copy the list of users specified as Component Watchers (with the plugin of the same name) into the list of Watchers, at issue creation time. I'm trying to do this with a Script-Runner post-function, after creating a custom field of type Component Watchers.
The part that I'm missing is how to obtain the Component Watchers usernames as a list. Any idea?
Try the Behaviours plugin. There you can specify "behaviour"-s, that can be mapped to projects and issue types, and there you can specify Groovy Scripts to run during transitions.
It won't be easy, but it is versatile and does not eat too much resources.

How are chapters handled in Typo3 Neos?

I want to use chapters and chapter-menu as a e.g. image gallery, reference module or other collections in Typo3 Neos.
As there are multiple domains with different content in my installation i have a problem with the NodeTypes.yaml:
All my site packages are based on NeosDemoTypo3Org. Because i don't want to have multiple entries "chapter", "chapter menu", "youtube" and so on, i deleted the NodeTypes.yaml in my copies of NeosDemoTypo3Org (which is still installed).
When i add a page with content element "chapter menu" to a package and put some chapters in it, the chapter overview is only displayed, if am putting the NodeTypes.yaml back into my package configuration. But then again i have multiple entries of the same thing.
How/where can i configure this to fit my needs?
That should be no problem. Just having the Chapter etc. in one NodeTypes.yaml is enough for now (until we implemented separation per Site which we want to have at some point). But I guess you adapted all occurances of "TYPO3.NeosDemoTypo3Org" in your TypoScript to match the new package name? You need to of course change that back for everything that is related to those NodeTypes. The TypoScript must point to the correct name for this NodeType. And you have to declare the TypoScript in each package because TypoScript is NOT shared in contrast to the NodeTypes.
What you could do is create a "base package" that contains the NodeTypes and TypoScript (and Tempaltes for those) and include the TypoScript in each of your Site packages.

Urlmapping for camel case with more than one meaningful step

As we know, grails automatically maps MyController to [root]/my as expected, but if I have MyAnotherController it gets mapped to [root]/myAnother. I would like to get it mapped automatically to [root]/my/another.
Is there a way to do this without putting additional URL mapping directives to conf/UrlMappings.groovy?
There is an open JIRA related to this (placing controllers in sub folders/ packages). Go ahead and vote for it. I would love to see this implemented in Grails.
http://jira.codehaus.org/browse/GRAILS-1243

Resources