Proper way to modify tpl/blocks/top-bar.php

More
4 years 5 months ago #7454 by blibecap
blibecap created the topic: Proper way to modify tpl/blocks/top-bar.php
Is there a proper way to modify the file /templates/jm-services/tpl/blocks/top-bar.php so that when template is updated I don't loose my changes?

Here are my changes
/*
# orgional code was this
# v$topbar1span = ($this->checkModules('top-bar2')) ? '6' : '12';
# $topbar2span = ($this->checkModules('top-bar1')) ? '6' : '12';
*/

$topbar2span = ($this->checkModules('top-bar2')) ? '11' : '12';
$topbar1span = ($this->checkModules('top-bar1')) ? '1' : '12';

Please Log in or Create an account to join the conversation.

More
4 years 5 months ago #7466 by marcin
marcin replied the topic: Proper way to modify tpl/blocks/top-bar.php
Hello,

Well, you can do it in the following way:
1) Duplicate and rename the top-bar.php block.
2) Create a new layout (for example copy of default.php) and add the new top-bar block for this layout.
However, if there will be an update of default.php or top-bar.php file in the future, you may need to adjust your custom files.
If you want to change only that one thing in top-bar.php file, I think it is a better idea to write down somewhere your changes to remember about them and restore them after future updates.

Regards,
Marcin

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #7502 by blibecap
blibecap replied the topic: Proper way to modify tpl/blocks/top-bar.php
Thanks I was hoping that there was a simple redirection file I could create.

Please Log in or Create an account to join the conversation.

Time to create page: 0.238 seconds

INDICO S.C.

ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2019 Joomla-Monster.com All rights reserved.

Joomla-Monster.com and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.