Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Prometheus6 on
Not sure if this is where I should ask about this...
I have link lists in the form of OPML files I want to include in the sidebar. Since they change very infrequently I decided to be lazy and write a script that parses it into a series of <a> tags. Where can I put the include() statement so that it's visible in the custom blocks?
Comments
create a custom php block (ad
create a custom php block (admin > administer > blocks)
--
Drupal services
My Drupal services
Thanks but
I need to wait 24 hours before asking a question.
But what I'm doing is creating a php function that reads an OPML file and outputs the links. I have several files, though, different categories. I don't want to enter the code into every block.
What I did was add the include to the bottom of bootstrp.inc. Now I can enter
opml_to_linklist("filename.opml");
and just use the appropriate file name in each block.