Interspire Product Knowledge Base

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Export to PDF

User Opinions (67 votes)

95% thumbs up 4% thumbs down

How would you rate this answer?



Thank you for rating this answer.

How can I pull text/content from an Interspire Website Publisher page into a panel?

This guide will help you pull text from an Interspire Website Publisher page, so that you can keep different parts of your template updated just by editing a page in your control panel.

For this guide,  I'll use an example of the page header.

If you are using ArticleLive NX 1.7 the file we will be modifying is: /templates/{your template}/Panels/PageHeader.php

If you are using ArticleLive NX 2.0 or Website Publisher 4.5 the file is: /includes/display/PageHeader.php

Open up the file that applies to your site and find:

// Parse the panel of tokens, etc

then on a new line after it, paste this code:

If you are using Interspire ArticleLive NX 2.0 or Interspire Website Publisher 4.5, use this code:
LoadClass('page');
$newtext = new AL_PAGE;
$newtext->SetId(23);
$newtext->_SetData();
$GLOBALS["NewText"] = $newtext->GetField('Content');


If you are using Interspire ArticleLive NX 1.7 use this code:
$newtext = new AL_PAGE;
$newtext->_pageId = 23;
$newtext->_SetData();
$GLOBALS["NewText"] = $newtext->_content;


Change the number 23 to the page id you want to use. To find the page id of the page you want, go to the admin > manage pages. Click or hover over the "Edit" link. There in the URL will be &pageId=23 where 23 is the page id number. Use that number above in place of 23.

Now you can use this global placeholder in the /templates/{your template}/Panels/PageHeader.html file:

%%GLOBAL_NewText%%

(this corresponds to $GLOBALS["NewText"]. So if you want it to be something else, change $GLOBALS["NewText"] to $GLOBALS["Blah"] and use %%GLOBAL_Blah%%)

That will now be replaced with the content from the page you specify. If it doesn't seem to 'update' after you edit the page, make sure you either clear the cache on the settings page.

If you have any troubles with this guide, send us a trouble ticket via your control panel.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Powered by Interspire Knowledge Manager - World's #1 Best Selling FAQ and Knowledge Base Software