Search the Community
Showing results for tags 'concatentation'.
-
I've been using the intermediate template structure (_init.php, _main.php and string concatenation to build output for my various template sections defined in _main.php This is a bit of a ball-ache as it renders my templates hard to use in editors (string concatenation doesn't work well with element matching/bracket matching. Is there a better way to put this together (not using includes)? e.g. _main.php <?php if($band1_content):?> <section class="w-section page-heading grey"> <div class="w-container inset-container"> <?php echo $band1_content;?> </div> </section> <?php endif; ?> band.php $band1_content = '<div class="w-container inset-container tabs filter-options"> <a class="w-inline-block pr-tabs" data-group=""><div class="pr-tabs-text">All</div></a> <a class="w-inline-block pr-tabs" data-group="'. $pages->get(1015)->name.'"><div class="pr-tabs-text blue">'. $pages->get(1015)->title.'</div></a> <a class="w-inline-block pr-tabs" data-group="'. $pages->get(1016)->name.'"><div class="pr-tabs-text green">'. $pages->get(1016)->title.'</div></a> <a class="w-inline-block pr-tabs" data-group="'. $pages->get(1017)->name.'"><div class="pr-tabs-text orange">'. $pages->get(1017)->title.'</div></a> </div>'; Pete
- 13 replies
-
- template
- intermediate
-
(and 1 more)
Tagged with: