Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 06:58 am EST
Geeklog Forums
Calling one staticpage from another
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
Unlike stories, staticpages can have if statements, which allows a setup for multilinguality right in the same item (using parameters). However, it causes a problem because there's only one canonical/print/sitemap link.
So I thought of another idea - creating one main staticpage (e.g. foobar) and then minor staticpages (foobar_en, etc.) that do nothing other than setting up the language for the main staticpage.
Alas, staticpages are not actual files, so how can you call them?
For example, my foobar_en is
echo what_do_i_put_here(PLG_replaceTags("[staticpage_content:foobar]"));
I tried using "eval" for what_do_i_put_here, but nothing happened.
This works but just returns finished text (that doesn't take the new $lang into account):
echo PLG_replaceTags("[staticpage_content:foobar]"); // ignores the new $lang
So do you know how to call/include/require one staticpage from another?
So I thought of another idea - creating one main staticpage (e.g. foobar) and then minor staticpages (foobar_en, etc.) that do nothing other than setting up the language for the main staticpage.
Alas, staticpages are not actual files, so how can you call them?
For example, my foobar_en is
Text Formatted Code
$lang = "en"; // the main foobar uses that to choose a languageecho what_do_i_put_here(PLG_replaceTags("[staticpage_content:foobar]"));
I tried using "eval" for what_do_i_put_here, but nothing happened.
This works but just returns finished text (that doesn't take the new $lang into account):
Text Formatted Code
$lang = "en"; // the main foobar uses that to choose a languageecho PLG_replaceTags("[staticpage_content:foobar]"); // ignores the new $lang
So do you know how to call/include/require one staticpage from another?
6
11
Quote
All times are EST. The time is now 06:58 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content