i wanted to create an internal link to a special article with the [ID integer]read this[/ID] Replacement-Tag, but the ID in the generated hyperlink isn't correct.
[ID 46]read this[/ID] generates index.php?id=0,47,0,0,1,0
but the leading 0, isn't correct. i think there it must be 47,0,....
ID and 0 have to be moved, right?
anyone else experienced this? or my fault by using the tag?
I mean, it's no big deal, can create links with other tags, but if it's really a bug, it could be easily debugged.
Bug in creating id with [ID] ?
-
jmeyknecht
- Posts: 112
- Joined: Sun 11. Jan 2004, 23:13
- Location: Merseburg, Germany
- Contact:
the tag is working correctly, maybe your ID is wrong? you can find it out in phpmyadmin go to your phpwcms table in the field articlecat and take a look at it - the id is auto_increment, so here you can find out if you have 100% the right id...
regards, jan
regards, jan
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
-
jmeyknecht
- Posts: 112
- Joined: Sun 11. Jan 2004, 23:13
- Location: Merseburg, Germany
- Contact:
no, the article with ID 47 is present.
but the link has the wrong order of the IDs.
index.php?id=47,0,0,0,1,0 would be the right link.
but the generated link contains index.php?id=0,47,0,0,1,0
you see? not the right order.
I'm using phpwcms patched to 2004-02-20
btw. [ID alias]read this[/ID] is working. is just when i use the article id.
but the link has the wrong order of the IDs.
index.php?id=47,0,0,0,1,0 would be the right link.
but the generated link contains index.php?id=0,47,0,0,1,0
you see? not the right order.
I'm using phpwcms patched to 2004-02-20
btw. [ID alias]read this[/ID] is working. is just when i use the article id.
Jan212 is correct. I believe you are mistaken. This replacement tag "inherits" the structure ID where it is placed [in your case the first placeholder 0 would seem to be inheriting the structure ID from the template... which is index (website start)] If it were placed in an article within structure level 1... the resulting link would be generated as:jmeyknecht wrote: [ID 46]read this[/ID] generates index.php?id=0,47,0,0,1,0
but the leading 0, isn't correct. i think there it must be 47,0,....
ID and 0 have to be moved, right?
See explanation here:index.php?id=1,47,0,0,1,0
http://www.phpwcms.de/forum/viewtopic.php?t=720
An alternative would be:0 = structure ID
1 = article ID
2 = e.g. 1 -> Print
3 = if 1 show structure
4 = if link to article then show (1)
5 = spare for serveral things
Code: Select all
[int http://www.mydomain.com/phpwcms/index.php?id=0,47,0,0,1,0]read this[/int]Code: Select all
[int http://www.mydomain.com/phpwcms/index.php?id=7,47,0,0,1,0]read this[/int]-
jmeyknecht
- Posts: 112
- Joined: Sun 11. Jan 2004, 23:13
- Location: Merseburg, Germany
- Contact:
ahhhh. now i see.
sorry, you are right... it was the structure id that was 47.
the article id is a different id. i messed up with all these numbers ;-)
what i wanted, was to set a link to a category in the structure. and this category has id 47, but of course it isn't the article also.
that's why it was working with the alias. i mixed up the structure and article id.
thx.
sorry, you are right... it was the structure id that was 47.
the article id is a different id. i messed up with all these numbers ;-)
what i wanted, was to set a link to a category in the structure. and this category has id 47, but of course it isn't the article also.
that's why it was working with the alias. i mixed up the structure and article id.
thx.