Contao Open Source CMS > Contao forum

Switch to german forum

Index > Templates and CSS > Custom Sections not Working

TheresaB
User
Avatar
OK, let me start my saying:
  1. I am using 2.6.2 version
  2. My template contains <?php echo $this->message; ?>
  3. In Settings, under System, I have [listed it in the "Custom layout sections field"/li]
  4. I created a Module named "home page - message box" that is custom html with only a paragraph of text
  5. I have created a Page Layout called "Home" where I selected "message" check bok under the "custom layout sections"
  6. In the same page I have added the "home page - message box" and designated it for the "message" column


Having done the following I should have text in that particular field. I have copyright module show up in the footer but I cannot get anythign to show up for <?php echo $this->message; ?>

I have coded area names so that you can see where it should appear at http://www.ractivestudio.com/

Any light that could be shed on this would be most appreciated.

Thank you
2008-12-03 20:42
davidm
User
Avatar
Posts: 82
Paris, France
I think you need to use this in your template :

iconCode:
<?php echo $this->sections['message']; ?>

instead of

iconCode:
<?php echo $this->message; ?>

Hope it helps :)
++ open source enthusiast, textpattern and modx veteran, typolight student ++

.: loving typolight's versatility and flexibility, impressed by reliability and security and enjoying fast development time :.

++ amazed by the Catalog/CatalogExt/Taxonomy combo and lots of high quality modules... kudos ! +++
2008-12-04 12:56
TheresaB
User
Avatar
THANK YOU!!! :love:

I have been pulling my hair and running ragged trying to fix that. It works and brings in my modules wonderfully.

Now my question is where is this documented? I searched and searched and looked at the tutorials and never found it.

But you David :love: are my hero!!!
2008-12-04 15:41
davidm
User
Avatar
Posts: 82
Paris, France
Well I don't know if and where it's documented, but the actual hero is cyril who taught me this particular bit @french forums :thumbup:

Cyril is a coder willing to answer even the most obvious (coder-wise) questions which is great to us who don't master php :huh:
I don't know where I'd be if it weren't for him !

I just browsed the unanswered questions and figured I'd pass on his knowledge :)
That's my view of a community : share, share and share again.

Sometimes I even come up with original contributions, but it usually takes a bit of trial and error to get there :-/
Last edited by davidm, 2008-12-04 23:50
++ open source enthusiast, textpattern and modx veteran, typolight student ++

.: loving typolight's versatility and flexibility, impressed by reliability and security and enjoying fast development time :.

++ amazed by the Catalog/CatalogExt/Taxonomy combo and lots of high quality modules... kudos ! +++
2008-12-04 23:48
TheresaB
User
Avatar
Just the same, whether you thought of it of passed the knowledge on, you saved me and with that little change to the line I was able to finish the template out. and can let the client look it over.

So your status as hero remains with me. :love:
2008-12-05 18:04
davidm
User
Avatar
Posts: 82
Paris, France
Glad I could help :)

And I hope it'll also help others like it helped me !
++ open source enthusiast, textpattern and modx veteran, typolight student ++

.: loving typolight's versatility and flexibility, impressed by reliability and security and enjoying fast development time :.

++ amazed by the Catalog/CatalogExt/Taxonomy combo and lots of high quality modules... kudos ! +++
2008-12-06 13:57
also works for me too now
Last edited by kris, 2009-01-15 15:52
2009-01-13 19:33