How do I use template inheritance in QUIQQER? ====== <center>  </center> In version 1.3 QUIQQER appears with the possibility of template inheritance. Through template inheritance you are now able to inherit your created template from another template. You are now able to overwrite individual parts / blocks of the parent template in your own template package. If the child template does not have certain HTML / CSS files, these are obtained from the parent template. So you don't have to start templates from scratch. #### Repository - https://github.com/quiqqer #### What Will I Learn? In this tutorial we will show you how to quickly create a template using the new inheritance in QUIQQER 1.3. As described in the [last post](https://steemit.com/utopian-io/@pcsg-dev/quiqqer-template-inheritance) we have implemented a template inheritance which allows you to specify a kind of parent template for your template. #### Requirements - You need a QUIQQER System - You need a new QUIQQER Package - You need to know from which Template you want to inherit - The parent template should include Asset URL's with `{$Template->getTemplateUrl('URL')}`and should uses `{fetch}` to include HTML files. - You need to know whats a `composer.json` file is #### Difficulty - Intermediate #### Tutorial Contents I assume that your package is available and that you have created the first files for your package. This means you have a `composer.json` file and a `package.xml`. If not then please create this, if yes, then we will start now. **First of all** you have to define your dependency in your `composer.json` so that the parent template is available in the system. If you want to inherit from `quiqqer/template-cologne`, you have to add this template to the require part of the package `composer.json file`. In this tutorial I assume that we want `quiqqer/template-cologne` as a dependency. This is a quite complicated template and shows super that small parts can be overwritten even in complicated templates quickly and easily. ``` "require": { "quiqqer/template-cologne": "1.*|dev-master|dev-dev" } ``` A complete `composer.json` could look something like this: <center>  </center> After that you have to tell your template package that it has a parent template. You do this in the `package.xml` of your package by adding a `<template_parent>` entry. A complete `package.xml` could look something like this: <center>  </center> Once these two things are done, you can start overwriting the templates. So that you can overwrite individual files of the parent template, you only have to create the same folder structure as in your source template. So that you know which things you can overwrite in the template there are two ways. The developer has documented this or you can see for yourself which areas can be overwritten. Most of the time the documentation is a bit incomplete, so you should have a look at the Parent Template. For example, what you need to pay attention are all {fetch} functions in HTML. The Smarty `{fetch}` function inserts another HTML template exactly at this point. In the Cologne Template, for example, there are the following code lines: <center>  </center> If we now want to customize the template `footerCopyright.html` for us, we just have to create a template folder and a new HTML file called `footerCopyright.html`. Now we can write everything we want into it. Of course, we prepared the whole thing to show you what it looks like. Examples always clarify the whole thing a lot better. (https://github.com/QUIQQER/template-inheritance-example/tree/master/template) From now on you can overwrite templates and quickly offer completely new templates. Look forward to more tutorials in the near future. We will explain to you how to build your e-commerce shop or your SaaS quickly and easily. #### Curriculum - *More coming soon* ;-) #### Proof of Work Done - https://github.com/QUIQQER/template-inheritance-example We wish you a lot of fun with QUIQQER Thanks for reading, Hen, for PCSG Developers
author | pcsg-dev |
---|---|
permlink | how-do-i-use-template-inheritance-in-quiqqer |
category | utopian-io |
json_metadata | {"tags":["utopian-io","tutorials"],"image":["https://steemitimages.com/640x0/https://github.com/QUIQQER/QUIQQER/raw/master/bin/images/Readme.png","https://cdn.steemitimages.com/DQmUu8mkC9qs68VMMEVdr6G83anGPRX5HwLDbqYV8bjK5q6/composer-json.png","https://cdn.steemitimages.com/DQmRnnVponyrLRrWUojrY2wTXKYQX7j6DH9zRxJMTcr1M54/package.png","https://cdn.steemitimages.com/DQmUKgVi2N8B3QGB5vsvJBn7fSBokJ524LCz7tt2JyZ8yHn/footer-html.png"],"links":["https://github.com/quiqqer","https://steemit.com/utopian-io/@pcsg-dev/quiqqer-template-inheritance","https://github.com/QUIQQER/template-inheritance-example/tree/master/template","https://github.com/QUIQQER/template-inheritance-example"],"app":"steemit/0.1","format":"markdown"} |
created | 2019-04-04 18:33:12 |
last_update | 2019-04-04 18:33:12 |
depth | 0 |
children | 4 |
last_payout | 2019-04-11 18:33:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 14.210 HBD |
curator_payout_value | 4.480 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 4,504 |
author_reputation | 41,490,075,306,333 |
root_title | "How do I use template inheritance in QUIQQER?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 82,491,004 |
net_rshares | 26,597,706,236,726 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tombstone | 0 | 1,743,902,069,458 | 7.36% | ||
penguinpablo | 0 | 372,909,846,878 | 15% | ||
eforucom | 0 | 25,820,102,507 | 3.5% | ||
j3dy | 0 | 11,169,730,531 | 100% | ||
miniature-tiger | 0 | 102,182,995,720 | 50% | ||
jga | 0 | 1,179,730,235 | 9.2% | ||
helo | 0 | 46,687,148,049 | 21.03% | ||
tensor | 0 | 48,672,000,449 | 100% | ||
codingdefined | 0 | 28,624,740,380 | 21.03% | ||
leir | 0 | 2,159,809,298 | 50% | ||
espoem | 0 | 95,854,142,398 | 46.76% | ||
filipino | 0 | 956,805,870 | 10% | ||
mcfarhat | 0 | 15,496,738,973 | 8.41% | ||
utopian-io | 0 | 22,916,503,202,961 | 18.41% | ||
jaff8 | 0 | 44,697,223,578 | 21.03% | ||
newsrx | 0 | 85,292,097 | 6.85% | ||
ravenruis | 0 | 16,763,475,879 | 75% | ||
cryptonized | 0 | 53,064,228,299 | 15% | ||
steemitag | 0 | 3,381,199,990 | 10% | ||
amosbastian | 0 | 67,086,943,869 | 21.03% | ||
portugalcoin | 0 | 15,889,325,099 | 15% | ||
sargoon | 0 | 168,581,207 | 3.42% | ||
tobias-g | 0 | 159,320,742,099 | 42% | ||
michaelizer | 0 | 250,616,023 | 100% | ||
zcool | 0 | 188,413,354 | 10% | ||
pcsg-dev | 0 | 6,034,906,753 | 100% | ||
michael44 | 0 | 350,161,028 | 100% | ||
wolfguards | 0 | 5,039,892,470 | 100% | ||
ulockblock | 0 | 40,919,950,603 | 12.31% | ||
clusonsopi | 0 | 528,324,456 | 100% | ||
neymaheadca | 0 | 532,380,594 | 100% | ||
koxmoneju | 0 | 530,031,269 | 100% | ||
dyegadese | 0 | 542,141,827 | 100% | ||
nicole5lw | 0 | 529,944,083 | 100% | ||
steemchoose | 0 | 6,662,216,564 | 9.75% | ||
alexandra5njs2 | 0 | 531,361,023 | 100% | ||
cryptouno | 0 | 460,719,705 | 5% | ||
mops2e | 0 | 553,293,098 | 37.4% | ||
gracet8j0hperez | 0 | 551,919,331 | 100% | ||
anna0 | 0 | 529,216,284 | 100% | ||
destinymd | 0 | 537,266,599 | 100% | ||
makaylank | 0 | 531,322,574 | 100% | ||
emmad6 | 0 | 529,027,438 | 100% | ||
avamqnv2 | 0 | 533,572,481 | 100% | ||
meganj80 | 0 | 553,433,094 | 100% | ||
sydneyb | 0 | 537,816,567 | 100% | ||
swapsteem | 0 | 2,683,161,865 | 9.2% | ||
alexandrao | 0 | 535,400,477 | 100% | ||
pet.society | 0 | 4,604,532,621 | 4% | ||
cutowncomfa | 0 | 529,872,596 | 100% | ||
biadogbmarland | 0 | 551,269,042 | 100% | ||
nieracilock | 0 | 537,458,227 | 100% | ||
melamoonspe | 0 | 533,764,889 | 100% | ||
biofogmunsner | 0 | 534,456,311 | 100% | ||
merlin7 | 0 | 4,515,910,215 | 0.24% | ||
steem-ua | 0 | 682,413,613,325 | 6.85% | ||
kaczynski | 0 | 130,897,187 | 100% | ||
steemexpress | 0 | 1,544,639,549 | 2.78% | ||
ascorphat | 0 | 2,128,015,086 | 2.5% | ||
supu | 0 | 29,722,071,859 | 3.5% | ||
uredinsec | 0 | 515,618,752 | 100% | ||
rambleroid | 0 | 515,389,480 | 100% | ||
ackanen | 0 | 514,954,754 | 100% | ||
dendiopul | 0 | 515,246,148 | 100% | ||
engar | 0 | 514,982,429 | 100% | ||
ithered | 0 | 514,945,072 | 100% | ||
lasilari | 0 | 515,428,101 | 100% | ||
ugonet | 0 | 515,355,476 | 100% | ||
enedo | 0 | 515,028,425 | 100% | ||
turisted | 0 | 515,158,285 | 100% | ||
atospugha | 0 | 515,368,420 | 100% | ||
hotalo0 | 0 | 514,932,015 | 100% | ||
othus | 0 | 514,864,444 | 100% | ||
steemianin | 0 | 514,918,913 | 100% | ||
etadgitu | 0 | 514,857,863 | 100% | ||
ayiert | 0 | 514,850,719 | 100% | ||
tenyears | 0 | 530,749,934 | 100% | ||
dicetime | 0 | 17,434,521,205 | 9.2% |
Thank you for your contribution @pcsg-dev. After reviewing your tutorial we suggest the following points listed below: - Your tutorial is quite short for a good tutorial. We recommend you aim for capturing at least 2-3 concepts. - Code sections are better displayed using the code markup, instead of placing them as screenshots. - We suggest that in your next tutorial details more what you have developed, so that the reader less experienced in programming understands well your contribution. - We suggest that you put the result into an image of what was developed in this tutorial. Thank you for your work in developing this tutorial. Looking forward to your upcoming tutorials. Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category. To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/8/3-1-3-2-3-2-2-3-). ---- Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
author | portugalcoin |
---|---|
permlink | re-pcsg-dev-how-do-i-use-template-inheritance-in-quiqqer-20190404t213857019z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["pcsg-dev"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/8/3-1-3-2-3-2-2-3-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"} |
created | 2019-04-04 21:38:57 |
last_update | 2019-04-04 21:38:57 |
depth | 1 |
children | 1 |
last_payout | 2019-04-11 21:38:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 5.643 HBD |
curator_payout_value | 1.769 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,138 |
author_reputation | 599,458,605,033,115 |
root_title | "How do I use template inheritance in QUIQQER?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 82,497,254 |
net_rshares | 10,613,117,388,707 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
yuxi | 0 | 23,010,058,834 | 100% | ||
codingdefined | 0 | 27,159,484,058 | 20.01% | ||
espoem | 0 | 29,699,385,675 | 15% | ||
utopian-io | 0 | 10,367,524,931,365 | 11.47% | ||
jaff8 | 0 | 42,412,190,668 | 20.01% | ||
emrebeyler | 0 | 0 | 0.01% | ||
amosbastian | 0 | 63,657,648,192 | 20.01% | ||
nenya | 0 | 1,512,178,217 | 80% | ||
sudefteri | 0 | 6,781,713,710 | 100% | ||
reazuliqbal | 0 | 13,747,302,088 | 8% | ||
amico | 0 | 1,067,992,720 | 0.55% | ||
ulockblock | 0 | 24,160,145,752 | 7.39% | ||
nijn | 0 | 802,132,012 | 80% | ||
quenty | 0 | 1,629,280,525 | 60% | ||
curbot | 0 | 2,474,272,741 | 100% | ||
v-1 | 0 | 607,174,354 | 100% | ||
ascorphat | 0 | 2,095,810,512 | 2.5% | ||
nimloth | 0 | 3,722,747,587 | 80% | ||
holydog | 0 | 784,708,659 | 2% | ||
cleanit | 0 | 268,231,038 | 55% |
Thank you for your review, @portugalcoin! Keep up the good work!
author | utopian-io |
---|---|
permlink | re-re-pcsg-dev-how-do-i-use-template-inheritance-in-quiqqer-20190404t213857019z-20190407t012249z |
category | utopian-io |
json_metadata | "{"app": "beem/0.20.17"}" |
created | 2019-04-07 01:22:51 |
last_update | 2019-04-07 01:22:51 |
depth | 2 |
children | 0 |
last_payout | 2019-04-14 01:22:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 64 |
author_reputation | 152,955,367,999,756 |
root_title | "How do I use template inheritance in QUIQQER?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 82,608,330 |
net_rshares | 0 |
#### Hi @pcsg-dev! Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation! Your post is eligible for our upvote, thanks to our collaboration with @utopian-io! **Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
author | steem-ua |
---|---|
permlink | re-how-do-i-use-template-inheritance-in-quiqqer-20190404t222121z |
category | utopian-io |
json_metadata | "{"app": "beem/0.20.19"}" |
created | 2019-04-04 22:21:21 |
last_update | 2019-04-04 22:21:21 |
depth | 1 |
children | 0 |
last_payout | 2019-04-11 22:21:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 287 |
author_reputation | 23,214,230,978,060 |
root_title | "How do I use template inheritance in QUIQQER?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 82,498,511 |
net_rshares | 33,671,919 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
cheneats | 0 | 33,671,919 | 50% |
Hey, @pcsg-dev! **Thanks for contributing on Utopian**. Weβre already looking forward to your next contribution! **Get higher incentives and support Utopian.io!** Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)). **Want to chat? Join us on Discord https://discord.gg/h52nFrV.** <a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
author | utopian-io |
---|---|
permlink | re-how-do-i-use-template-inheritance-in-quiqqer-20190405t054521z |
category | utopian-io |
json_metadata | "{"app": "beem/0.20.17"}" |
created | 2019-04-05 05:45:24 |
last_update | 2019-04-05 05:45:24 |
depth | 1 |
children | 0 |
last_payout | 2019-04-12 05:45:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 590 |
author_reputation | 152,955,367,999,756 |
root_title | "How do I use template inheritance in QUIQQER?" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 82,514,127 |
net_rshares | 0 |