How to add folder reference(folder group) using xcode file template? - c++

I'm trying to create some template to simplify some boring repeating stuff in existing project.
I need to create something like entity and it's behavior classes, e.g. I want to add new entity "Hero" and I need the following structure in the end:
Entities/Hero/Hero.h
Entities/Hero/Hero.cpp
Entities/Hero/StateControllers/HeroStateController.h
Entities/Hero/StateControllers/HeroStateController.cpp
So I've created the following structure in my xcode template
The problem is when I use "New file..." and create "Hero" all files are added but folders are blue what means that this folder will be considered as assets folder. But I don't need it. I need it to be group referenced to folder(yellow one). I've searched the whole internet and could not find anything for file templates.
Can anybody please help me?
Thanks in advance!

Related

How override woocommerce view-order template?

This page: /my-account/view-order/132616/
... is associated with the view-order.php template file under the my account section. I am able to edit this by going directly into the woocommerce plugin dir, but copying the file into /my-child-theme/woocommerce/myaccount/view-order.php does not have any effect. I am able to edit the orders.php template in this manner, but not this one. I haven't been able to find any answers online to this one: why some of these template files can be copied / overwritten and some cannot be? Also, there appears to be limited scope on applying a hook to manipulate the content on this page. What I want to do, is turn the product names listed here into links back to the products in the store. Thanks for any help!
turns out this doesn't satisfy my need since the content I'm trying to manipulate is in the woocommerce_view_order do_action. Now I'm on the hunt for a filter hook.

Is it possible to modify the templates used during creation of a C++ class by the Unreal Editor's Class Wizard?

I am starting a new project and it will require the creation of many C++ classes. In order to keep the project organized I created coded standards that will keep methods and member variables organized using regions, nothing too complex. However, I do not want to have to modify every new class I make adding the separators(regions) by hand or have to copy paste from another file.
In unity it is possible to modify the template used in the creation of a new script, but i am having trouble finding the same information for the Unreal Engine. I am not using source and if it is required to do so I will probably just copy paste it for every class.
I tried searching online for information on the subject, but the results were less than useful.
You can modify, create, and delete templates in Unreal Engine. Since you are not using Unreal Engine source, the templates are all located in the C:\Program Files\Epic Games\UE_{version}\Templates directory. If you are using Unreal Engine source, then the location will instead be {engine-location}\Templates. In these directories, you can modify the configs, the content, and the source code of each template. And of course, you can create new templates and delete existing ones.
If you do create a new template, then make sure that you do the following steps:
Move the project that you want to make a template out of to one of the Templates folders mentioned above depending on the verison of Unreal Engine you have (source vs non-source).
Update the ProjectName variable in your template's Config\DefaultGame.ini file.
Copy any of the existing templates' Config\TemplateDefs.ini file to your template's Config folder.
Modify the copied TemplateDefs.ini file, specifically the LocalizedDisplayNames and LocalizedDescriptions variables. These are the name and description of your template that show when the template is selected while trying to make a new project in Unreal Engine. Note that you may have to modify the other parts of the TemplateDefs.ini file depending on your project/template.
Lastly, add pictures in your new template's Media folder. Add one picture named {new-template-name}.png, which will be the icon of the template and another picture named {new-template-name}_Preview.png, which will be be the preview of the template that appears alongside the name and description after one clicks on the template icon while trying to make a new project.
For more information, check out these resources:
https://docs.unrealengine.com/en-US/Engine/Basics/Projects/CreatingTemplates/index.html
https://www.youtube.com/watch?v=MYM7iSh-uac

Joomla: Using the same override in two different templates

I am working with Joomla 1.5 and using two different templates. To customise the frontend, I am overriding components and modules in /template/myTemplate/html/componentOrModule/. In a few cases I need the same overide in both templates.
Until now, I am using include to reuse the code. But it is still annoying, that I have to create the folders and files twice.
I reckon, that there is a better/easier way of doing it. But I do not have clue.
Did someone have the same problem and has already solved it? Any ideas appreciated.
There is no Joomla solution to this issue. My proposal would be to have a stub file in your template html folder and then include that file from a third folder. Something like the following:
/templates//html/com_content/article/default.php
You can copy that file into all the relevant override folders and then have one folder in the templates folder named "common" where you have the actual files with the output.

Dreamweaver changing path to site's reference instead of local

I have noticed recently, when I apply a template to a new HTML website, all the relative paths are pointed to my local files, example: file:///C|/webstuff/files but I cannot set them to relative paths that are pointed to my server, http://www.websitehere.com/ I have read that some versions of Dreamweaver will not allow this, can anyone confirm this? And if anyone knows a solution or temporary fix that'd be appreciative.
I will commonly have to "detach" the template, make the necessary changes and upload template-free but I would like to avoid doing that if possible.
Thanks
The behavior you're describing occurs when you have a new file open in Dreamweaver that has never been saved and a template applied. In other words:
A new file is created in DW
The template is applied before the file has ever been saved.
DW will create file paths that point to your hard drive.
The resolution is to save the file before applying the template.

Magento - locate specific core files

I am familiar with theming and using template hints in the Magento back office to locate .phtml files.
What I am not really familiar with are the core files such as app/code/core/Mage/Catalog/Model
What I need to do is override a core file like I would a core phtml file by copying it to 'my theme'.
I basically want to amend some labels which appear on the order summary page of the Magento checkout process - domain.com/checkout/cart/
I followed the trail to the phtml files using template hints. Within the app/design/frontend/default/mytheme/template/checkout/cart I found the code
renderTotals(); ?>
Now I managed, by accident, to stumble upon two of the files I wanted to change:
/httpdocs/app/code/local/Mage/Sales/Model/Quote/Address/Total/Grand.php
/httpdocs/app/code/local/Mage/Sales/Model/Quote/Address/Total/Shipping.php
I made local copies of these files (http://www.magentocommerce.com/wiki/how_to/how_to_create_a_local_copy_of_app_code_core_mage) to override the default labels, like I would if I was overriding a template file.
My question is, how can you locate core files which pertain to the 'stuff' you want to change, located in function calls such as renderTotals(); ?> in the phtml files?
Not being able to pinpoint stuff like I can with template hints is slowing me down, and I am struggling to find a solution as I am not up on all the vocab surrounding Magento yet.
Hope this makes sense and thanks in advance!
From the same settings page where you turn on Template Path Hints, also turn on the "Add Block Names to Hints" setting. This will show you PHP class names such as: Mage_Sales_Model_Quote_Address_Total_Grand to which you can deduce the folder path (underscores represent a subfolder, and the last piece represents the file name).
If you're getting a block such as Mage_Sales_Model_Quote_Address_Total_Default then sometimes it just takes a little common sense to see that it's pulling in other files from the same folder (such as Grand.php and Shipping.php). But there are generally only a couple files in the same folder, so this is pretty easy to see.
As Sid Vel said, a good Search Project functionality is helpful. But if you find yourself looking at Abstract.php of some class, often you need to look in a subfolder in that directory with the proper name to find the concrete implementations. But still, it gets you very close to where you need to be.
I always use Dreamweaver's site / directory search function. It will scan through all the files in the Core folder and tell you where the function is from. In your case, I would search for "renderTotals". You need to enable PHTML editing in Dreamweaver.
Most IDE's will allow this kind of search option. In Aptana you can Ctrl + Click on the function to open the file it is coming from. Magento takes ages to index itself on Aptana, due to its sheer size.