including a page
JohnNoc-old - January 22, 2007 - 07:06
| Project: | Rep[lacement]Tags |
| Version: | 5.x-1.1 |
| Component: | .tags Modules |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Having a replacement tag for the php snippet on adding any existing page/path would be very useful to many, I think.... including me :-)
example...
tag:
{INCLUDE_PATH:aggregator/categories/1}
and will be replaced by php snippet:
<?php
$q = $_GET['q'];
$_GET['q'] = drupal_get_normal_path('aggregator/categories/1');
print menu_execute_active_handler();
$_GET['q'] = $q;
?>I have tried to add it in the custom SiteWide - Rep[lacement]Tags with no success. I guess a php code on the text-area isn't supported :-(
Maybe adding it on the system.tags?
Thanks.

#1
Yes, its intented to disallow php in table reptags: 1. to keep the code easy and fast and 2. - most important - for security reasons. If this was possible every user with 'manage user/sidewide reptags' could embed 'potentially' bad code into the pages. Thats what the .tags modules are for - to provide more complex replacement tags. Table reptags are just for textual replacements.
What you suggest is advanced functionality IMO and I dont think I will add such code to system.tags.
Can you explain what you need this for? Sounds like you want something similar to the panels module (http://drupal.org/project/panels)? I'm not certain many people will need to embed whole pages into their nodes!? But if you want to create or help with an 'embed.tags' module (or similar) I will be happy to commit this. But ...
Regards Thilo
#2
Thanks for the reply.
Hmmm....if I only can!!! My coding prowess is in the analyze other codes--copy--paste--hack--crossfingers--try stage still. I tried coding this embed thing before submitting the request but i'm still php coding challenged. :-( But surely, if i get successful on this embed.tags, you're the first to know! :-)
Well....the panels module is an alternative, yes. But some pages are still not incorporated with the panels module and a user still has to hardcode the snippet aforementioned in a custom content on a panels region.
Usage example?
hmmm...what about the site owner creating a new content type where the site owner creates reuseable content or features. With an embed.tag, site users can reuse those content into their custom pages.
Not if the site owner wants more than just the headlines
you can take a peek at a custom 404 page on this site http://www.norgesportal.no/drupaldrupaldrupal (note:site is still under development)
This was achieved with regions and embedding a page's content in a custom block. But after wanting to embed numerous pages as well as news pages on their related taxo term and other pages, the admin/build/block page is too long already due to numerous auto-module blocks like categories, aggreg., tagadelic, etc. Besides, creating a block with the php embed snippet then using the blocks.tags to embed them on a new node is a longer route and defeats the purpose of Rep[lacement]Tags' control and ease of use.
hmmmm...this is a long post :-) thanks for the patience!