Embed Static Page in template

26 views
Skip to first unread message

stef.emi...@maxcommunications.co.uk

unread,
May 12, 2021, 8:47:58 AM5/12/21
to AtoM Users
Hi,
I've been working doing AtoM front end restyles using css and making some basic template changes. I have a situation where the themed AtoM home page contains two text fields which I want to be editable by the user from within AtoM.

I can partially fix the problem by utilising the inbuild static page which appears on the home page by default. However, the content of the (themed) home page is arranged in such a way that including all the content in a single field is difficult at best.

Is there a way to either include an additional static page in a template (I'm currently using _header.php) or, alternatively, is there a way of adding a second separate editable content field to a specific static page?

Thanks in advance
Stef

José Raddaoui

unread,
May 12, 2021, 10:45:49 AM5/12/21
to AtoM Users
Hi Stef,

If you want both sections to be editable and don't want to do a lot of customizations (mixing two static pages could be complicated), would it be possible to require a separator in the homepage content? For example, if you format the content like ...

<div>First block</div>
-------SEPARATOR-------
<div>Second block</div>

Then you could split that content and place each block where you want in the template:


$blocks = explode('-------SEPARATOR-------', $content);
render_value_html($blocks[0]);
render_value_html($blocks[1]);

Best regards,
Radda.

Stef Emiljanowicz

unread,
May 13, 2021, 9:44:54 AM5/13/21
to ica-ato...@googlegroups.com
Hi Radda, 
That's actually a great idea and one that never occurred to me. I'll start playing with it now and see how it pans out.

Thanks very much.
Stef

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/6839a545-a878-4ebc-a1c9-83ae6a03d46bn%40googlegroups.com.


--

Stef Emiljanowicz

Web Development Manager

Tel. 0208 309 5445

 

Max Communications Ltd.

2-3, Gunnery Terrace

Cornwallis Road

London SE18 6SW


www.maxcommunications.co.uk

www.royalwarrant.org/company/max-communications-ltd


 



Please note, this email together with any attachments must be treated as confidential. If you are not the intended recipient, please contact the sender immediately and delete the original email. Any use, copying, disclosure, alteration or reliance on the contents of this email for purposes without the named sender’s express authorisation is strictly prohibited



Reply all
Reply to author
Forward
0 new messages