[Solved] Retrieving the parent's hierarchy level...

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
eric62
New Member
New Member
Posts: 3
Joined: Tue Mar 13, 2012 4:06 pm

[Solved] Retrieving the parent's hierarchy level...

Post by eric62 »

Original title: Retrieving the parent's hierarchy level from a shared child
----------------------------------------------

Cms Version: 1.10.2

Installed Modules:

CMSMailer: 2.0.2
CMSPrinting: 1.0
FileManager: 1.2.0
MenuManager: 1.7.7
MicroTiny: 1.1.1
ModuleManager: 1.5.3
News: 2.12.3
Search: 1.7
ThemeManager: 1.1.4
Gallery: 1.4.4
CGExtensions: 1.27.9
CGCalendar: 1.9


Config Information:

php_memory_limit:
process_whole_template: false
output_compression: false
max_upload_size: 20000000
default_upload_permission: 664
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.2.17-pl0-gentoo
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
memory_limit: 64M
max_execution_time: 30
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 20M
upload_max_filesize: 20M
session_save_path: No check because open basedir active
session_use_cookies: On (True)
xml_function: On (True)


Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 5.0.90


----------------------------------------------
Hi there,

New to this forum, I made some searches but apparently did not found what should be the right solution (but thanks anyhow for the nice CGSimpleSmarty reference).

Here is the problem: I have (non visible) "generic pages" that only contains an UDT, which queries the DB based on a posted argument. I would like to be able to identify the "calling parent" hierarchy level in order to dispay in my template a corresponding sub-menu.

Currently, I'm also passing the level as parameter, but of course any change in the page ordering forces me to re-assign (manually) all the parameters.

Saving the value in a $_SESSION variable works, but causes problems of course if you start another tab/window in your browser.

Sample:
1...
2...
3. Goups
3.1 Engineering
3.1.1 Members
3.1.2 Agenda
3.1.3 Benchmarks
3.1.4 Implementation sites
3.2 Sales
3.2.1 Members
3.2.2 Agenda
3.2.3 Marketing campaigns
4..
5..
6 (hidden) Generic
6.1 Members
6.2 Gallery
6.3 Agenda

3.1.1 will just be an internal page link, with
- Parent: 3.1,
- Additional Parameters: &Grp=ENG&Depth=3.1, and
- Destination Page: 6.1

Although it's working fine, inserting a new "2" level automatically updates Parent and Destination, but will require to update all the Additional Parameters, down to the last level :'(

Any good/practical idea/solution ???

Thanks in advance.
Last edited by eric62 on Wed Mar 14, 2012 10:04 pm, edited 1 time in total.
eric62
New Member
New Member
Posts: 3
Joined: Tue Mar 13, 2012 4:06 pm

Re: Retrieving the parent's hierarchy level from a shared ch

Post by eric62 »

I found a solution, that looks far from being very elegant >:D ... it is to have a "side script" that re-sync the parameters posted with the hierarchy:
By getting the field "hierarchy" (e.g. value '00004.00001') from the table "cms_content", I can update the corresponding "params" field in the table "cms_content_props" by setting it to '&Grp=ENG&Depth=4.1'.

I would really prefer to retrieve it more smoothly :-\ ...
eric62
New Member
New Member
Posts: 3
Joined: Tue Mar 13, 2012 4:06 pm

Re: [Solved] Retrieving the parent's hierarchy level...

Post by eric62 »

Solved by Bess here
Post Reply

Return to “Layout and Design (CSS & HTML)”