Guest Posted October 13, 2007 Share Posted October 13, 2007 Hi, With the site docs, I wanted to change the order of the links via the TPL files rather than going through the database and renumbering the order. Anyway, I can manually change the doc-id to what I want like this From <a href="index.php?act=viewDoc&docId={DATA.doc_id}" class="txtSiteDocs">{DATA.doc_name}</a> To <a href="index.php?act=viewDoc&docId=2" class="txtSiteDocs">{DATA.doc_name}</a> (which would show my second doc) BUT the problem is the Doc Name. No matter what order I put them in, the Doc Names still go in the order of what is in the sitedocs.inc.php file So, basically, without having to change {DATA.doc_name} to the actual text or adding a {LANG_?} parameter, how can I get the 'Doc Name' to reflect the 'Doc Id' in the sitedocs.tpl file? Quote Link to comment Share on other sites More sharing options...
burgensteen Posted October 13, 2007 Share Posted October 13, 2007 If your going to go to the trouble of naming the doc id individualy why not just enter the doc name aswell in your line of code ?? Quote Link to comment Share on other sites More sharing options...
Robsta Posted October 13, 2007 Share Posted October 13, 2007 Try the FAQ in the documentation project, it will tell you how to re-order the documents by ID. By default they are in document name order I believe. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 14, 2007 Share Posted October 14, 2007 OK, firstly, I know I can manually change the site doc names by replacing {DATA.doc_name} with the actual name of the page BUT I would like the option of having the name automatically reflecting the id. I don't want to fiddle around with my database for something as small as this when I could have the option of just changing the TPL file. It's just a matter of control. Also, if I can find the alternative to {DATA.doc_name}, I will be able to have more control over my categories and subcategories order, too. I have already checked out the FAQ in regards to the reordering of the site docs but the options are limited. There's ordering ascending or descending by ID or ordering ascending or descending by name. The other problem with this line, if I were to put it into the site docs <a href="index.php?act=viewDoc&docId=1" class="txtSiteDocs">{DATA.doc_name}</a> is that even though I can reorder the the site docs themselves, the Doc names still reorder in the way outlined in the sitedocs.inc.php file. EG the pages with the IDs 1,2 and 3 could be ordered to be 3,1 and 2 BUT the doc names would still have the 1, 2 and 3 order I've tried changing {DATA.doc_name} to {DATA.doc_name=doc_id} but that gave a blank result {DATA.doc_id} but that just printed the doc ID number instead of the name So, because I am a technical dumkopf I experiment with different variation but I mostly get error pages or blank spaces where the name should be. I wanna make sure that I can fix this through the TPL file and not through the include file. So, if anyone finds the solution (before me), please let me know. Thanks PS: And please don't suggest that I get a mod instead. I would rather have a solution and learn something from the experience. Quote Link to comment Share on other sites More sharing options...
Robsta Posted October 14, 2007 Share Posted October 14, 2007 Just hardcode the document name aswell then, so the template does not autogenerate the list. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 14, 2007 Share Posted October 14, 2007 Just hardcode the document name aswell then, so the template does not autogenerate the list. I suppose you are right. I've scoured a number of files trying to work something out but I suppose the simplest way is to just type the text normally without screwing with coding or over-technical crap. I suppose I was making abig fuss over something so small. Thanks for the wake-up slap to the face, Robsta. I needed it. Cheers Quote Link to comment Share on other sites More sharing options...
Robsta Posted October 14, 2007 Share Posted October 14, 2007 Just hardcode the document name aswell then, so the template does not autogenerate the list. I suppose you are right. I've scoured a number of files trying to work something out but I suppose the simplest way is to just type the text normally without screwing with coding or over-technical crap. I suppose I was making abig fuss over something so small. Thanks for the wake-up slap to the face, Robsta. I needed it. Cheers a pleasure tehehe. This is the only way to do it purely within the template file. Quote Link to comment Share on other sites More sharing options...
burgensteen Posted October 14, 2007 Share Posted October 14, 2007 Yeah thats what I meant, sorry if I didnt explain it properly. Like: <a href="index.php?act=viewDoc&docId=2" class="txtSiteDocs">CONTACT US</a> In the TPL file Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.