1
kailas
Includes in Modules Content
  • 2010/3/27 22:37

  • kailas

  • Just popping in

  • Posts: 6

  • Since: 2010/3/26


I posted this to the modules trouble shooting forum but got no response.

I need and answer so I'm trying this forum, sorry for cross posting.

--------

I want to clone a particular page in WFCHANNEL several times and include a small navigation block inside the content itself.

(other XOOPs modules also have a content fields, called by various names, but they end up being the primary content block served by the theme... so the question really goes across all modules)



It is a simple html <div> with a <ul> list of links, a mini submenu (see below) that works just fine if I have it in the content as explicit html.

Theoretically it should be as simple as saving that html chunk out to a file "pager-menu.php" and then adding this, which will work if I try it in a external test php file

<?php include("/pdf_download/pagers/pagers-menu.php"); ?>

But, if I put this include in the "Page Content" field of a WF Channel record, it is not rendered. I searched the web but don't find any documentation on how this could be done. I need all these WF channels pages to be calling the same block and we only want a single instance of the block. Hence the use of an include. We have SSIs turned on on this machine, but a standard <! #include virtual="path/to/html/block.html" > also does not work

Thank you. (complete XOOPS newbie, but experienced web programmer)


<div id="pagers-link-list" style="margin: 10px; border: 2px #9b2e19 solid; padding:0px; width:210px; float: right;">
<img src="pdf_downloads/pagers/thumbs/Diwali-broadsheet-thumb.jpg" alt="Diwali pager" width="200" height="326" hspace="3" vspace="12" />
<h4 style="text-align:center">Download PDFs</h4>
<ol>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Hindu-New-Year_broadsheet-color.pdf">Hindu New Year</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Guru-Purnima_broadsheet-color.pdf">Guru Purnima</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Varalakshmi-Vrata_broadsheet-color.pdf">Varalakshmi Vrata</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Krishna-Jayanthi_broadsheet-color.pdf">Krishna Janmashtami</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Ganesha-Chaturthi_broadsheet-color.pdf">Ganesha Chaturthi</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Navaratri_broadsheet-color.pdf">Navaratri</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Diwali_broadsheet-color.pdf">Diwali</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Skanda-Shashti_broadsheet-color.pdf">Skanda Sashti</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Pancha-Ganapati_broadsheet-color.pdf">Pancha Ganapati</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Vaikunta-Ekadashi_broadsheet-color.pdf">Vaikunta Ekadashi</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Sankranti-or-Pongal_broadsheet-color.pdf">Sankranti/Pongal</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Thai-Pusam_broadsheet-color.pdf">Thai Pusam</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Holi_broadsheet-color.pdf">Holi</a></li><li><a href="/pdf_downloads/pagers/Hindu-Festival_Mahasivaratri_broadsheet-color.pdf">Mahasivaratri</a></li>
<li><a href="/pdf_downloads/pagers/Hindu-Festival_Rama-Navami_broadsheet-color.pdf">Rama Navami</a></li>
</ol>
</div>

Thanks!

2
ghia
Re: Includes in Modules Content
  • 2010/3/28 12:49

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
<?php include("/pdf_download/pagers/pagers-menu.php"); ?>
You can't do such things in content, only in templates.
You need to include in full text everytime the html code for this menu.
Some modules like News allow pagination of long articles with a tag (and preference).
Other solutions are a custom block with the menu, displayed for some modules, or a menu module.