| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
XC5 - including static pages content in tpl | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
XC5 - including static pages content in tpl
In XC4 it was easy to include the content of a static page in a tpl. This gave a lot of flexibility in providing users with a relatively friendly way of editing chunks of content, without having to worry about the layout aspects.
How do I do this in XC5?
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
#2
|
|||||||||
|
|||||||||
Re: XC5 - including static pages content in tpl
Please can you explain what you want to achieve? What is a static page? Do you mean a page created with SimpleCMS module? Or is it a plain content that can be stored as a new tpl? What tpl you want to insert it into? Why you want to do this?
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: XC5 - including static pages content in tpl
By static page .... I mean the pages in simpleCMS ... which are sort of the equivalent of the old "static pages".
Some of the content pages for the design I am working on are quite complex. In the past I have found it easier to break the different sections into different "pages" that can be edited via the wysiwyg editor. Then a page template pulls them all together. (one site where I have done this is www.scarlettjewellery.com). I need to do something similar with the current site... Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
#4
|
|||||||||
|
|||||||||
Re: XC5 - including static pages content in tpl
It is possible to insert a SimpleCMS page into a template, however the code will be a bit long.
An easier way would be splitting your template into many .tpl files, and the inserting "sub-templates" with the "widget" tag: Code:
Will this work for you?
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#5
|
|||||||
|
|||||||
Re: XC5 - including static pages content in tpl
That's useful to know, but I don't think it will work as the key thing is for the client to be able to edit their content easily (ie. via a friendly editor).
How would I include the page contents ... presumably it is held in the database ... Or is there another way? Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
#6
|
|||||||||
|
|||||||||
Re: XC5 - including static pages content in tpl
Here is what you can do:
1. In your custom module create a new widget class: Code:
You don't need a new template file for the widget because there is a template that does the job already (so we just use it from our new widget class). 2. Now you can use this widget in your templates as follows: Code:
|
|||||||||
#7
|
|||||||
|
|||||||
Re: XC5 - including static pages content in tpl
Thank you ... I will give this a try when I get to that point ...
Jan
__________________
Jan Beesley (Currently Xcart 5 Previously XCart Gold from 3.5....) |
|||||||
#8
|
|||||||||
|
|||||||||
Re: XC5 - including static pages content in tpl
Off-topic, JannieB Did you get my last PM?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#9
|
|||||||
|
|||||||
Re: XC5 - including static pages content in tpl
Hi, am new to widgets and have X-cart 5.2
Want to create a new simple block on the side, and insert an <iFrame> code inside the block. Example: Google Map or a Woofu form or even just some text. Being a beginner, is anyone able to point me to the starting point please. Many Thanks in advance, Tom
__________________
Tom |
|||||||
#10
|
|||||||||
|
|||||||||
Re: XC5 - including static pages content in tpl
Check this guide out:
http://kb.x-cart.com/display/XDD/Creating+sidebar+menu+in+customer+area
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|