Question

I am using Hakim El Hattab's amazing reveal.js, and besides the problem below (which is due to my placeholders I noticed...), the script is working awesome for me.

Due to this being because of my placeholders, the problem is not with the script, but I believe that there will be some genius here somewhere that could point me in the right direction with this.

I am using the following HTML in my CMS:

<div class="societe-tpl-1">
    <div class="societe-tpl-1-header">
        [[HOME]]
        <div class="societe-tpl-1-header-separator">|</div>
        [[CONTENTS]]
        [[INDEX]]
        [[DOWN]]
        [[UP]]
        [[NEXT]]
        [[PREVIOUS]]
    </div>
    <div class="societe-tpl-1-content">
        <div class="societe-tpl-4-contents retro-apps">
            <div class="third">
                <div class="pg-number">[[PAGENUM]]</div>
                <h1>[[HEAD1]]</h1>
            </div>
            <div class="third">
                [[IMAGE1]]
                [[IMAGE2]]
                [[IMAGE3]]
            </div>
            <div class="third">
                <article>
                    <h2>[[SUBHEAD_1]]</h2>
                    <p>[[SUBTEXT_1]]</p>
                </article>
                <article>
                    <h2>[[SUBHEAD_2]]</h2>
                    <p>[[SUBTEXT_2]]</p>
                </article>
                <article>
                    <h2>[[SUBHEAD_3]]</h2>
                    <p>[[SUBTEXT_3]]</p>
                </article>
            </div>
        </div>
    </div>
    <div class="societe-tpl-1-footer">
        <div class="societe-tpl-1-footer-nextmonth">
            <a href="#">next month</a>
        </div>    
        <div class="societe-tpl-1-footer-mainsite">
            <a target="_blank" href="http://www.renault.co.za">www.renault.co.za</a>
        </div>            
    </div>
</div>

Using my CMS based on Code Igniter, I replace the placeholders with the appropriate code which I read from MySQL database. Where I have the the placeholders, the HTML does not get evaluated, but the HTML in the "Next month" link does get evaluated.

Example output problem

Anyone with any idea why my code in placeholders does not get evaluated? I am using a PHP script that replace the placeholders with their real content before page rendering (Code Igniter's display_override hook), so they are replaced before reveal.js kicks in, as far as I can tell.

Thanks in advance!

Was it helpful?

Solution

I found the solution. The data got saved in the database as HTML entities (&lt; and &gt;) and therefore the filter replacing the <a> tags did not work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top