Replacing template's name path in template file - socialengine

I have purchased a template and I have uploaded and installed it successfully. After that I have navigated to the theme editor and used the Clone option to replace the template's name with my website's name. Everything replaced successfully except the logo path. It is shown like the following in the view source
img src='application/themes/template's name/images/logo.gif'
I want the above coding to be like
img src='application/themes/mywebsite's name/images/logo.gif'

Related

How to access code of a specific page in shopify?

I am building a Shopify website https://fone-kase-plus.myshopify.com/.
For example, I want to modify code of this page only: https://fone-kase-plus.myshopify.com/pages/iphone-6 .
How is it possible to do it?
If you go in the admin, and to that page (from Online Store/Pages) on the right you will see "Theme Template" and a name. That's the template that is applied to that page.
That name is a file in your theme under templates with a name like page.your-template-name.liquid.
If you copy that file and create another one like page.another-template-name.liquid you can then apply that template only to the pages you want. Then you modify that template file to make a page as you like.

Creating custom product page on BigCommerce

I'm trying to create a modified product page in my BigCommerce Cornerstone theme and I'm following the video on the following link:
https://stencil.bigcommerce.com/docs/custom-layout-templates
The video claims that I need to use a live URL when I create a new HTML under /template/pages/custom/product and map it in the .stencil file.
The way I created a new live URL is that I created a completely empty web page. The first difference I notice though, compared to the video is that when I navigate to the page it's not completely empty as shown in the video but shows the header and footer of the website.
When the video asks to copy the contents of the original product.html into my newly created HTML under /template/pages/custom/product, the HTML markup doesn't get picked up i.e. the page will not show components of a product page.
I got stuck at this point and cannot continue with modifying the template.
If you are creating a custom product template, you would need to map it to the live URL for a product in your store. Mapping a custom product template to a web content page won't work.
It's important to note the difference between page types. If you are creating a custom category template, you would map it to an existing category page in your store, etc.
After you map the product page URL in your .stencil file, be sure to restart Stencil CLI. You'll need to restart to see the changes reflected on localhost in your browser (i.e. a blank page at the product page url if you mapped an empty html file to it).

Custom WHMCS order template from scratch; nothign showing up

I'm creating a custom WHHMCS order template from scratch. I've created a folder neworderform and put it in /whmcs/templates/orderforms. I put a file cart.php in it, and it shows up as a new theme under General Settings > Ordering, but when I go to http://example.com/cart.php?carttpl=neworderform, I just get a blank page and don't see the content of my file.
Is there some minimal amount of template I need in order to make it work? Right now it's basically a "hello world" file.
I would duplicate an existing order form like "web20cart", and empty their files' content. And for your information template files uses tpl not php.

How to dynamically associate html content through Onet.xml in Content Editor WebPart?

We are using SharePoint Foundation 2010
We have a custom site definition where in Onet.xml we have placed a Content Editor Web Part on a Custom ASPX page having encoded html content in it just like how it is described in this article.
Issue with this approach is that following this approach makes the HTML content static and can not be dynamically changed for each user.
Is there a way i can make Onet.xml refer an HTML file from a SharePoint folder e.g. Layouts, so that when content gets changed in the HTML file, it gets reflected for each user on their custom page ?
Got it, I think I will be using Page Viewer Web Part instead of Content Editor Web Part which would make my life simpler. I would add an html file path from say Layouts folder and refer it in my Page Viewer Web Part. This way my content would remain dynamic.

How to call an external Javascript file from a webpart

I'm building a Web Part for SharePoint 2010 and I would like to add a simple modal.
I've registered the external js script as follows:
ScriptLink.Register(this.Page, "js/jquery-1.5.min.js", true);
ScriptLink.Register(this.Page, "js/jquery.simplemodal-1.4.1.js", true);
Somehow I'm getting that a message saying that the file was not found, because it's looking at 1033/_layouts directory, or something like that.
So, my question is: how could I reference an external JavaScript file from my webpart, without placing them at that directory?
In my opinion, you should be deploying your scripts to layouts, along with images, stylesheets, etc. that are not intended to be customized by your users.
You can map the folder "Layouts" to your project in VS 2010.
Then add subfolders to reflect your project name, etc. (Right click on project -> Add-> SharePoint "layouts" Mapped Folder)
Layouts
- ProjectName
- - Scripts
- - - jquery-1.5.min.js
Then, when you deploy your solution, the scripts will be copied to the proper location..
In your webpart, you can reference your scripts like:
In code:
ScriptLink.Register(this.Page, "ProjectName/Scripts/jquery-1.5.min.js", false);
But, I prefer in the .ascx:
<SharePoint:ScriptLink ID="ScriptLink2" Name="ProjectName/Scripts/jquery-1.5.min.js" runat="server" OnDemand="false" Localizable="false" />
If you set "Localizable" attribute to "false" on the ScriptLink tag then it will omit the "1033" folder.
I'm not sure if this still works in SharePoint 2010, but here is how I did it in SharePoint 2007:
ScriptLink.Register(this.Page, "js/jquery-1.5.min.js", true);
List<string> list = (List<string>)HttpContext.Current.Items["sp-ScriptLinkValues"];
int index = list.Count - 1;
string item = list[index];
list[index] = item.Replace("/_layouts/1033/js",
"http://ajax.googleapis.com/ajax/libs/jquery/1.5");
If you add another "content editor" web part, you can place your "Include" code of the JavaScript file there with the complete file location.