What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
It worked well, without passing data from indexcontroller to twig. Looks like passing data to twig f
Comments
-
how does the controller look like? and the path to the template?
0 -
/** * @param \Symfony\Component\HttpFoundation\Request $request * * @return \Spryker\Yves\Kernel\View\View */ public function indexAction(Request $request) { $data = ['helloWorld' => 'Hello Spryker!']; return $this->view( $data, [], '@HelloWorld/views/index/index.twig' ); }
0 -
DOes the path of the index.twig as appears in the render view call?
0 -
{% extends template('page-layout-main') %} {% define data= { helloWorld: _view.helloWorld } %} {% block content %} <div class="row"> <div class="small-12 columns"> <h2>{{ data.helloWorld }} </h2> </div> </div> {% endblock %}
0 -
/** * @param \Spryker\Yves\Router\Route\RouteCollection $routeCollection * * @return \Spryker\Yves\Router\Route\RouteCollection */ protected function addHelloWorldIndexRoute(RouteCollection $routeCollection): RouteCollection { $route = $this->buildRoute('/hello-world', 'HelloWorld', 'Index', 'indexAction'); $routeCollection->add(static::ROUTE_HELLO_WORLD_INDEX, $route); return $routeCollection; }
0 -
can you post a screenshot to the relevant file tree in the project?
0 -
the
views/
directory is missing in the middle there0 -
Still the same error.. it didnt changed.
0 -
did you try to clear the cache?
vendor/bin/console cache:empty-all
0 -
Did it, still. the same
0 -
can you send a screenshot of the entire error message?
0 -
sure
0 -
i am running out of obvious ideas here π€
0 -
also need to leave soon
0 -
We can see tomorrow, I have leave too.
0 -
Have a lovely evening.
0 -
@U01AHAH9478 still around?
0 -
thanks! you too! letβs solve it tomorrow!
0 -
Yeap
0 -
good morning
0 -
fresh day, fresh luck! π
0 -
Good morning, restarted my system, its the same .
0 -
Hello π ASAIK I did the same and had to register the RouteProviderPlugin to an Array. Also I had a bit trouble with the caching at the first time.
0 -
hi! thanks norman! i think we have the route provider correctly registered, because it tries to load the right template, but fails to do so
0 -
src/Pyz/Yves/Router/RouterDependencyProvider.php
0 -
Ah it fails at twig?
0 -
but can you please check, @UPWG882P6?
0 -
yes
0 -
unfortunately i donβt have time before 1230 π
0 -
@UPWG882P6 Iβm not sure about your HelloWorldRouteProviderPlugin, maybe you forgot to extend from the AbstractRouteProviderPlugin and use the addRoutes Method ? Like --> https://documentation.spryker.com/docs/tutorial-hello-world-scos
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 896 Developer Corner
- 758 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 23 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random