I'm trying to add a new template (.tpl) file to an existing design for a company. It is fairly basic:
* New page with iFrame that can be controlled from admin.
* Add new CSS to the new file that will either overwrite existing CSS or add to template.
I have tried to find reference to where I should place such a template and how to add it to an existing design, and the only reference I find is how to make a new design. In addition I cannot fully (or at all) understand the catalogue structure.
As I see it I should add a new extension. Anybody have some pointers that are step by step regarding this issue?
Not to mention - is this the right place to ask for this?
You will get a much better traction on the eZ Publish Community Portal, there : http://share.ez.no . Ask your question in the forums : http://share.ez.no/forums
See you there,
Cheers,
I guess you could create an object of the class "Link" in your admin. The link url would be the url of your iframe. Then, in your design folder, in override/templates folder, you could create an iframe.tpl file, and tell in override.ini.append.php you want to override the node/view/full.tpl template, normally used to view a node, with your iframe.tpl, only for that Link node you would have created.
Related
I'm a greenhorn with typo3 templating. Actually I'm using "bootstrap_package" (standard layout). I would like to create a sub-page without logo, menu and footnote. I just want to have the content elements on a blank page. How do I do this? Can anyone help me?
Best regards
cgroughy
You should give some more information why you need such a special rendering to get some more detailed help.
The usual reasons for such a page are design flaws as there are more suitable solutions inside TYPO3.
In general: You need to create a new page rendering, where you switch off the generation of the HTML header.
add on:
make a page where you collect all the pages which should be available in this special rendering. This page should be a subpage from your root-page. regarding relaurl: [x] exclude from path
in this page create a typoscript template record.
as these pages need only one rendering I propose to modify the default page object instead of creating a new page object (with a new typeNum).
in the setup field of this template record remove all headers with:
config.disableAllHeaderCode = 1
You might need to disable further CSS and JS, especially if they are loaded at the end of the page.
if you need another html-markup than the default you can modify the configuration here: wraps, (fluid-)templates, ...
Then add your special pages with content.
I created my own template named ibtheme, then I copy woocommerce folder from Woocommerce plugin to my template. But when I click on a product on frontpage, I see that it call the template files in plugins/woocommerce/templates/single-product, not from ibtheme/woocommerce/templates/single-product/
Please help me to override product page template!
Thanks advance!
As you have already discovered, you can edit the template files in an upgrade safe way through overrides. Simply copy it into a directory within your theme named /woocommerce, keeping the same file structure.
Example: To overide the price display template, copy: wp-content/plugins/woocommerce/templates/single-product/price.php to wp-content/themes/ibtheme/woocommerce/single-product/price.php
You can read the full documentation for WooCommerce theming at Template Structure + overriding templates via a theme
I would suggest that only copy/override the specific templates that you plan to modify. I've had to go through every single template to repair a broken theme/site after a major WooCommerce upgrade, so trust me, this will make it easier to upgrade WooCommerce in the future.
Suppose you created a class class Story, and you also created an Admin panel for this, StoryAdmin. This is referring to a common scenario in making a Django Application.
Now, in story admin, you want to assign certain fields to be displayed. There is currently no auto-complete for this, but there is hippie complete. ALT + /.
But this only goes so far as suggestions within the current page one is working in. How does one extend hippie complete to extend to other files that one has created?
This feature is available in Sublime Text 2. If a more elaborate example of what I am talking about needs to be demonstrated, please say so in the comments.
If this question is not appropriate for SO, vote to close it.
It's not supported yet in PyCharm, please vote for this feature request.
How can I include a page from magnolia into a magnolia template script?
In the template script with I can access data from a specific page, but how can I load that page into the template?
Let's say I have 2 pages each with its own template. Page 1 contains in its tree page 2. I want to include in the template script of page 1, page 2, but doesn't work.
Thank you very much :)
UPDATED
What I actually want to do is include my header in all of my project's pages. But I don't want to put it as a paragraph, because if I ever want to change my header, I'll have to edit all the project's pages.
So what I try to do and I don't know if this is the correct approach is to create a page template for the header. This template won't include any , or css, it's just the code for the header.
The next thing I want to do is create a page in magnolia with that model to be the header.
Next I'd like to include the page I've just created in my main template model for the project, but I can't figure how to do that.
I am new to Magnolia cms and initially I tried creating my demo site using stk. The only problem was that I couldn't use jsp as a scripting language, or at least I couldn't find any solution on the internet. I don't really know freemarker, but that's not really a big problem. I'm really reluctant in using freemarker because maybe in the future in a more complex project I might need some features that freemarker doesn't support, but jsp does. I'd like to build my site using jsp if that's possible with magnolia.
I'm sorry for this long update, but if anyone has any suggestions on what a best practice could be and if I could implement what I want in jsp I would be really grateful.
Thanks again for you time :)
If you're using the STK then see this guide on content-reuse.
If not have a look at the cms tag-lib, especially the tags cms:loadPage and cms:setNode with which you can get a piece of content and set it as a JSP/JSTL variable and then render it using cms:includeTemplate.
A common scenario is to 'inherit' content from the parent page, the header is an excellent example of this. What you do is for an area you walk up the content hierarchy and render everything from the parent pages in their area with the same name. This way the header which you've only added to the top page is included in all its children.
Another option is to a have special page which simply holds things to be included in other pages. Like header, footer and banners that should go in the side pane of some pages.
Including a page within another page doesn't really work. Page 2 already has its own <html> tags, its own <script> tags, and its own CSS, so including it wholesale into another page just simply doesn't make sense.
You do, however, have a couple of options:
Use an iframe. This will allow you to include the entirety of Page 2 in a region of Page 1.
More recent versions of Magnolia will allow you to render an individual paragraph, which you could then include in another page. (For example, you can see a single paragraph from http://demopublic.magnolia-cms.com/demo-project/about/subsection-articles.html at http://demopublic.magnolia-cms.com/demo-project/about/subsection-articles/article/main/0.html.) This requires knowing a bit about the way the data is structured, but is a pretty useful way to be able to selectively extracts bits of a page.
You can use the Magnolia API in your model class to pull data from sub-pages, and then make it available to your view template. This is the approach the STK uses to build teasers that include content from the pages they reference, and is probably the most powerful and flexible approach, but it does require actually writing some Java code. (See http://documentation.magnolia-cms.com/templating/stk/templating.html and http://documentation.magnolia-cms.com/reference/templating.html for details of how to use this approach.)
(Added after question was edited) The footer functionality that's included with the STK does almost exactly this. You might be interested to take a look at that and see how it's implemented there.
Hope that helps a bit!
I'll make this quick because I'm hoping to get it fixed as quickly as possible!
Basically, after making multiple posts asking for assistants creating a invoice template for ubercart, non of which got a reply, I decided to tackle my problam myself.
And that's what I've done. I've uploaded it to "/sites/all/modules/ubercart/uc_order/templates" with the name "uc_order-custom.tpl.php" ( like everyone says on the internet) but when I go to select which template I want to use only 'admin' and 'customer' appear (no 'custom')!
Any idea's why?
It appears, now, that the problem is with the dropdown menu's on the pages; the will not updte! Even if I delete the standard customer template from the directory, the option still appears in the menu but the email is just blank, for obvious reasons! So, I just wondered if it was possible for me to manually code/tell ubercart which template to use for the invoice, instead of relaying on the drop down menu's (if we can't figure out how to update them)?
Thanks in Advance, Andy
Try clearing Drupal's cache. New template files only get loaded when the template cache is cleared.
You need also to copy uc_order.tpl.php to your templates folder.