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..
Hello All, I am creating a new controller and trying to print a hello world, but getting unable to f
Hello All,
I am creating a new controller and trying to print a hello world, but getting unable to find template error, can anyone tell what is the issue
Comments
-
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 โ๏ธ - Guardians (admin)
Hey @U028VTHNMF1, did you create the template?
0 -
maybe this helps? https://documentation.spryker.com/docs/tutorial-hello-world-scos
0 -
@florian.scholz yes.
I have done the below
1. Created a new folder HelloSpryker inside /src/Pyz/Yves
2. Created a new folder Communication inside the HelloSpryker folder
3. Created a new folder Controller inside the Communication folder
4. Created a new file IndexController.php and added the below code<?php
namespace Pyz\Zed\HelloWorld\Communication\Controller;
use Spryker\Zed\Kernel\Communication\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;class IndexController extends AbstractController
{
/**- @param Request $request
*/
public function indexAction(Request $request)
{
return ['string' => 'Hello Spryker Welcome....!'];
}
}
0 - @param Request $request
-
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 โ๏ธ - Guardians (admin)
The link @UNGMX0012 posted has steps. Please have a look at step 5 to create the template
0 -
- Created another folder Presentation inside HelloSpryker
- Created a folder Index inside Presentation
- Inside Index folder created a new file index.twig and added the below code
{% extends '@Gui/Layout/layout.twig' %}
{% block content %}
{{ string }}
{% endblock %}0 -
@florian.scholz i created by following that link only
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 โ๏ธ - Guardians (admin)
You are talking about Yves-Module, right? Please follow the link posted in this thread - it seems you are following a guide for modules in Zed. Please read https://documentation.spryker.com/docs/tutorial-hello-world-scos again
0 -
no, i am talking about zed module. I am trying to create display the string in zed module
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 โ๏ธ - Guardians (admin)
ok, so we talk about Zed. in your step 1 you wrote โCreated a new folder HelloSpryker inside /src/Pyz/Yvesโ - was it a typo or did you create it in yves?
0 -
@U028VTHNMF1 ok, you are talking about a ZED module. it works a you wrote, you are just mixing a few things. You are saying โHelloSprykerโ folder but using
HelloWorld
namespace. Also you said you created a Yves module but are looking ZED. also try to send your code with syntax highlighting using ```create your folder structure as you described in ZED, use right namespace and it will work. controller should look sth like this:
```<?php
namespace Pyz\Zed\HelloSpryker\Communication\Controller;
use Spryker\Zed\Kernel\Communication\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;class IndexController extends AbstractController
{
/**
* @param Request $request
*/
public function indexAction(Request $request)
{
return ['string' => 'Hello Spryker Welcome....!'];
}
}```0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 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
- 70 Spryker Safari Questions
- 50 Random