I am using the printPageContent function within a printCodeBlock to insert the contents of a specific page into another page by using the page's titlelink.
Is there an equivalent function for inserting content from a news article using its titlelink?
I looked in the functions list but only saw printNewsContent which doesn't seem to do the same thing.
I apologize if I overlooked a function.
Thank you.
There is printNewsContent() which is the equivalent function. However, I doubt that this will work for you. Both these functions are "context" sensitive--that is printPageContent() will print the content of the current page and printNewsContent() will print the content of the current news article. It is not likely that there will be both a news article and a page as the "current context".
From within a codeblock you should be using object methods to refeence specific items. You can use echo $obj->getContent(); to print the content of a the object in question.
I am photographer with rudimentary programming skills ... I can understand how to use the printPageContent('titlelink') function and how to echo content of a current page but don't know how I would load a specific article / page. Any way someone could give basic example of using $obj->getContent();?
I can make do with using the printPageContent('titlelink') so hope that you don't remove that function for us non-programmers ...
Thanks! Just needed examples which did the trick for me.