Create a custom template page in shopware5 - shopware

I am working on my first shopware project. I need to create a new contact us page on shopware using my own template. My contact us page contains two forms and some other contents.
If someone can tell me how to create a custom template page on shopware I know how to add two forms and the other page contents into it.
In theme folder, there is a folder called “custom” for the content pages such as “about us” . I need to create a same type of page for my new contact us page.
Please let me know if the question is not clear.

You have to create a custom Theme via the Theme Manager in the Backend, the CLI or on your own with a Folder below themes/Frontend/ThemeNameHere and a file "Theme.php"(documentation).
After that you have to create a file at the same place where the one you want to override. In your case below themes/Frontend/ThemeNameHere/frontend/forms.
Then simply name the file like the original file and put in the first line {extends file="parent:frontend/forms/fileNameHere"} and copy the smallest available {block name="specificBlockName"}{/block}. After that you only have to change the selected theme in the backend to your new theme.
I think this is very well explained in the documentation.
Additional you can take a look at Udemy but it is in german.

Related

How to create templates in Kentico 9?

I need to create few templates for E-commerce site. Can anyone guide me as how to create templates in Kentico 9 ? There is an existing site and I need to create five other templates for the same. Am totally new to Kentico.
Please help.
There are many generic templates in Kentico, so you could clone any of them and modify to your needs - this might be easier for you to edit existing one as you'll have an example.
I'd recommend you to take following steps:
Go to Pages application in Kentico administration
Select any page in content tree on the left
go to properties -> template
Save as new template (so you do not screw up exting one) and save your changes
Switch to Design tab - this is where you build/configure you template
On the Design tab there is green line with template name and hamburger menu, where you can choose edit layout - this is where you can implement markup of the page as well as split your page into zones. After you accomplish html for you page save changes and close current dialog.
Now you should be back to Design tab. Here you can add web parts to zones you've specified in the layout. There is huge amount of different web parts (user controls). All they have different purpose and settings, so you should check documentation and figure out which one should be used in your particular case.
Try editable text, editable image, repeater, navigation in order to get an idea how it works.

Automatic way of export / import pages from liferay

I have created portlets for liferay and prepare couple of pages. Now I want to create installation script, which create pages definition in customer liferay server. I know that pages export/import is possible using LAR file, but this could be done only manualy, or using remote publishing which i am not able to do.
I was searching on net and found ddm tool. Which should be able to do that. Unfortunately i'm not able to get it work as it export only web content, blogs, wikis, etc, but not pages with portlets. It is probably because one of the condition is "Every Template must be assigned to a Structure. Don't create any templates on the Liferay server which does not have a structure connected to it.
". But how can I assign page to structure ? Cant find anything.
Or is there any other option for automatic page creation, which could be used ?
In case you created a custom theme, you can easily use the "resources importer" to create an entire site via the "sitemap.json" file (define pages: choose layout, assign portlets to the columns, ...). You can also export existing content as xml from the current instance and import them via the theme. Same thing for web content structures and templates.
for more details: https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-1/importing-resources-with-your-themes
Unfortunately theme is produced by another supplier, so this solution isn't suitable for me.
at the end i find working solution which consist of following steps:
create plugin hook
in hook setup upgrade process
in the upgrade process create pages with appropriate layout, friendlyUrl, etc. All these is possible to do using liferay api
Don't have enough reputation, so at least two links
https://www.liferay.com/de/web/james.falkner/blog/-/blogs/7cogs-is-dead-long-live-7cogs-
https://github.com/azzazzel/liferay-official-plugins/tree/master/hooks/sevencogs-hook/docroot/WEB-INF/src/com/liferay/sevencogs/hook/upgrade

SharePoint -copy library template when creating a new item

I have a document library with 4 content types, each having a default template. Users click on "New" and choose the content type for the new item.
I need WSS 3.0 to create a copy of that template (in the current folder) so that the users can edit it. I do not want WSS to open the template in a client application -I need it to leave the template right there.
How could I accomplish this?
Thank you for your help.
I wonder what you mean by EDIT the template copy, you mean setting properties? cause otherwise you must open it in a client app.
Anyway, we did t before for a client, he needed a file naming convention feature, so we added a feature that replaced the New button options with our own option, that takes the user to our custom page, where he selects the content type and fill in appropriate metadata. When clicking OK, the template is copied to the folder, given name according to the convention and assigned metadata. After that we opened the file in a client app, but you don't have to do that. The whole thing involved
Feature XML files
Layouts custom page with code behind
Custom menu customizer code to hide the New button options
Hope it helps

How to get to the admin page in Drupal

I've downloaded Drupal 6 and installed it on my local server, and ported a basic web site as a custom theme. I've set this as the default theme and everything works okay; the page appears nice with all the images and layout.
The problem is that now, no matter what I type as the URL I always get to my page. So how can I go to the admin page? /q=user does not work. I can change the theme from the database but that is not what I want. I just want to keep this theme and be able to access all the Drupal functionality.
For the custom page i've created the page.tpl.php and .info file. Along with the CSS file I've put them all in a new folder in the themes directory.
#abhaga's answer is spot on - you've turned the entire site's theme into a single page's HTML, so they're all going to be the same.
If you'd like to avoid glitching the admin side of things with a bad template file, you can set one of the core themes as your "administration theme" (in Site Configuration) - that way, the admin backend will always use that theme regardless of the other templates.
Ah! Basically page.tpl.php specifies the over all structure of site. Look at the original page.tpl.php file - it will be printing a variable called $content somewhere. That is the variable holding all the content of your specific page. You will need to print it at appropriate place in your pge.tpl.php
You should check out the right way of creating a theme here: http://drupal.org/theme-guide/6

Which is the better approach in custom pages?

I want to create a custom new item page for sharepoint but there are two approached that I
can use and I want to share your experience in determining which is better.
The first: is to create a page in a library then create a C# library project to handle
the events of the controls on the page.
The second: is to define a feature of the content type of my list and specify the new
item form to be my custom form, then create a website containing the custom form and put
this site at the layouts folder.
for me the first approach is fine but the problem is that a user may access the default
sharepoint new item form which I don't want to happen.
but I don't like the idea of placing the form in a library on the site.
so which is better in your opinion ?
thanks
i suggest you to go with your second approach ...
Create a completely new feature that allows you add your functionalty of page creation and any customization realted to that and deploy this one to the 12 hive features folder as a new feature and every time you want have such a page created you can you this template and create the page...
Well, frankly, I'm confused by both of your suggestions.
I don't see how the first one would ever work.
And the second one; you don't "put sites in the layouts folder".
Here's what I would suggest you to do:
Download and install the WSS Extensions for Visual Studio.
Create a List Definition using these new templates.
Copy the NewForm.aspx from the 12 hive and Customize it.
Download and install the WSP Builder from Codeplex.com
Add your custom list definitions and files to a new Feature project in WSP Builder.
Package the Feature up to a .wsp using WSP Builder and you are good to go.
Your custom page(s) should be placed in your custom folders in my opinion.
Hope this helps.
Your concern in the first approach is that people will still be able to access the default form. If you are not opposed to using a custom control template for a content type definition, I recommend creating a very simple redirect control template and assigning it to the content type's "New Form". Such a control template need only contain one custom control, which has an OnInit or OnLoad method that contains little more than a Page.Response.Redirect call. Make that redirect point to the page you create in your first approach, and now whenever anyone tries to access the default new form for that content type, they will instead be directed to your custom page with all of your custom code. It is perhaps a bit of a hack, but it's definitely functional.

Resources